@@ 79-94 (lines=16) @@ | ||
76 | $model = $this->checkParameterOrAsk('model', 'Enter the name of the Model to generate this Event for'); |
|
77 | ||
78 | $handler = $this->checkParameterOrConfirm('handler', 'Do you want to generate a Handler for this Event?', true); |
|
79 | if($handler) { |
|
80 | // we need to generate a corresponding handler |
|
81 | // so call the other command |
|
82 | $status = $this->call('apiato:generate:eventhandler', [ |
|
83 | '--container' => $this->containerName, |
|
84 | '--file' => $this->fileName . 'Handler', |
|
85 | '--event' => $this->fileName |
|
86 | ]); |
|
87 | ||
88 | if ($status == 0) { |
|
89 | $this->printInfoMessage('The Handler for Event was successfully generated'); |
|
90 | } |
|
91 | else { |
|
92 | $this->printErrorMessage('Could not generate the corresponding Handler!'); |
|
93 | } |
|
94 | } |
|
95 | ||
96 | $this->printInfoMessage('!!! Do not forget to register the Event and/or EventHandler !!!'); |
|
97 |
@@ 77-91 (lines=15) @@ | ||
74 | public function getUserInputs() |
|
75 | { |
|
76 | $repository = $this->checkParameterOrConfirm('repository', 'Do you want to generate the corresponding Repository for this Model?', true); |
|
77 | if($repository) { |
|
78 | // we need to generate a corresponding repository |
|
79 | // so call the other command |
|
80 | $status = $this->call('apiato:generate:repository', [ |
|
81 | '--container' => $this->containerName, |
|
82 | '--file' => $this->fileName . 'Repository' |
|
83 | ]); |
|
84 | ||
85 | if ($status == 0) { |
|
86 | $this->printInfoMessage('The Repository was successfully generated'); |
|
87 | } |
|
88 | else { |
|
89 | $this->printErrorMessage('Could not generate the corresponding Repository!'); |
|
90 | } |
|
91 | } |
|
92 | ||
93 | return [ |
|
94 | 'path-parameters' => [ |