setName('features:import') ->setDescription($this->trans('commands.features.import.description')) ->addOption( 'bundle', null, InputOption::VALUE_OPTIONAL, $this->trans('commands.features.import.options.bundle') ) ->addArgument( 'packages', InputArgument::IS_ARRAY, $this->trans('commands.features.import.arguments.packages') ); } protected function execute(InputInterface $input, OutputInterface $output) { $io = new DrupalStyle($input, $output); $packages = $input->getArgument('packages'); $bundle = $input->getOption('bundle'); if ($bundle) { $packages = $this->getPackagesByBundle($bundle); } $this->getAssigner($bundle); $this->importFeature($io, $packages); } /** * {@inheritdoc} */ protected function interact(InputInterface $input, OutputInterface $output) { $io = new DrupalStyle($input, $output); $packages = $input->getArgument('packages'); $bundle = $input->getOption('bundle'); if (!$packages && !$bundle) { // @see Drupal\Console\Command\Shared\FeatureTrait::packageQuestion $bundle = $this->packageQuestion($io); $input->setArgument('packages', $bundle); } } }