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(
class ImportCommand extends Command
{
- use CommandTrait;
use FeatureTrait;
public function __construct()
'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');
}
$this->getAssigner($bundle);
- $this->importFeature($io, $packages);
+ $this->importFeature($packages);
}
/**
*/
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);
}
}
}