10 use Symfony\Component\Console\Input\ArrayInput;
11 use Symfony\Component\Console\Output\OutputInterface;
45 $this->setCommandString(
$name);
54 private function setCommandString(
$name)
56 if (
$name ==
'setup:module:enable') {
57 $this->cmdString =
'module:enable';
59 $this->cmdString =
'module:disable';
72 foreach ($this->params[
'components'] as $compObj) {
73 if (isset($compObj[
'name']) && (!empty($compObj[
'name']))) {
74 $moduleNames[] = $compObj[
'name'];
76 throw new \RuntimeException(
'component name is not set.');
84 $statusCode = $this->command->run(
new ArrayInput(
$arguments), $this->
output);
87 if ($statusCode != 0) {
88 throw new \RuntimeException(
'Symfony run() returned StatusCode: ' . $statusCode);
94 $this->status->toggleUpdateError(
true);
95 throw new \RuntimeException(
96 sprintf(
'Could not complete %s successfully: %s', $this->cmdString, $e->getMessage())
output($string, $level=INFO, $label='')
__construct(AbstractSetupCommand $command, ObjectManagerProvider $objectManagerProvider, OutputInterface $output, Status $status, $name, $params=[])