X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FFeatures%2FImportCommand.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FFeatures%2FImportCommand.php;h=b9760bd1480ca2fcfb2542675b963cb7355a2cd4;hp=275859fb1a53c89f5de01a2c67a7c72bdd95ef4d;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/drupal/console/src/Command/Features/ImportCommand.php b/vendor/drupal/console/src/Command/Features/ImportCommand.php index 275859fb1..b9760bd14 100644 --- a/vendor/drupal/console/src/Command/Features/ImportCommand.php +++ b/vendor/drupal/console/src/Command/Features/ImportCommand.php @@ -12,10 +12,8 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Drupal\Console\Command\Shared\FeatureTrait; -use Drupal\Console\Core\Command\Shared\CommandTrait; -use Drupal\Console\Core\Style\DrupalStyle; use Drupal\Console\Annotations\DrupalCommand; -use Symfony\Component\Console\Command\Command; +use Drupal\Console\Core\Command\Command; /** * @DrupalCommand( @@ -26,7 +24,6 @@ use Symfony\Component\Console\Command\Command; class ImportCommand extends Command { - use CommandTrait; use FeatureTrait; public function __construct() @@ -49,13 +46,12 @@ class ImportCommand extends Command 'packages', InputArgument::IS_ARRAY, $this->trans('commands.features.import.arguments.packages') - ); + )->setAliases(['fei']); + ; } protected function execute(InputInterface $input, OutputInterface $output) { - $io = new DrupalStyle($input, $output); - $packages = $input->getArgument('packages'); $bundle = $input->getOption('bundle'); @@ -64,7 +60,7 @@ class ImportCommand extends Command } $this->getAssigner($bundle); - $this->importFeature($io, $packages); + $this->importFeature($packages); } /** @@ -72,15 +68,12 @@ class ImportCommand extends Command */ protected function interact(InputInterface $input, OutputInterface $output) { - $io = new DrupalStyle($input, $output); - $packages = $input->getArgument('packages'); $bundle = $input->getOption('bundle'); - - if (!$packages && !$bundle) { + if (!$packages) { // @see Drupal\Console\Command\Shared\FeatureTrait::packageQuestion - $bundle = $this->packageQuestion($io); - $input->setArgument('packages', $bundle); + $package = $this->packageQuestion($bundle); + $input->setArgument('packages', $package); } } }