X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FSite%2FMaintenanceCommand.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FSite%2FMaintenanceCommand.php;h=c94368a5e5a3a5cc8966eb972872d68b3ac9488b;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=3088e9c3995e77ff9ebe702947270cc96e8ffac6;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/vendor/drupal/console/src/Command/Site/MaintenanceCommand.php b/vendor/drupal/console/src/Command/Site/MaintenanceCommand.php index 3088e9c39..c94368a5e 100644 --- a/vendor/drupal/console/src/Command/Site/MaintenanceCommand.php +++ b/vendor/drupal/console/src/Command/Site/MaintenanceCommand.php @@ -10,17 +10,12 @@ namespace Drupal\Console\Command\Site; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Command\Command; -use Drupal\Console\Core\Command\Shared\ContainerAwareCommandTrait; -use Drupal\Console\Core\Style\DrupalStyle; +use Drupal\Console\Core\Command\ContainerAwareCommand; use Drupal\Core\State\StateInterface; use Drupal\Console\Core\Utils\ChainQueue; -class MaintenanceCommand extends Command +class MaintenanceCommand extends ContainerAwareCommand { - use ContainerAwareCommandTrait; - - /** * @var StateInterface */ @@ -55,14 +50,13 @@ class MaintenanceCommand extends Command ->addArgument( 'mode', InputArgument::REQUIRED, - $this->trans('commands.site.maintenance.arguments.mode').'[on/off]' - ); + $this->trans('commands.site.maintenance.arguments.mode') + ) + ->setAliases(['sma']); } protected function execute(InputInterface $input, OutputInterface $output) { - $io = new DrupalStyle($input, $output); - $mode = $input->getArgument('mode'); $stateName = 'system.maintenance_mode'; $modeMessage = null; @@ -82,7 +76,7 @@ class MaintenanceCommand extends Command $cacheRebuild = false; } - $io->info($this->trans($modeMessage)); + $this->getIo()->info($this->trans($modeMessage)); if ($cacheRebuild) { $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'all']);