Conditions | 3 |
Paths | 3 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function __invoke(InputInterface $input, OutputInterface $output) |
||
21 | { |
||
22 | if (!$input->getOption('no-block')) { |
||
23 | $controller = explode('/', $input->getArgument('route')); |
||
24 | $app = $this->appContainer; |
||
25 | |||
26 | /** @var Application $application */ |
||
27 | $application = $app->resolve(Application::class); |
||
28 | $command = $application->find('create:block'); |
||
29 | |||
30 | $inputs = [ |
||
31 | 'namespace' => $input->getArgument('namespace'), |
||
32 | 'blockname' => $controller[1] |
||
33 | ]; |
||
34 | |||
35 | if ($input->getOption('admin')) { |
||
36 | $inputs['--admin'] = 'true'; |
||
37 | } |
||
38 | |||
39 | $greetInput = new ArrayInput($inputs); |
||
40 | //$greetInput = $app->resolve(ArrayInput::class, $inputs); |
||
41 | $command->run($greetInput, $output); |
||
42 | } |
||
45 |