You are here

protected function GenerateGroupCommand::execute in Metatag 8

File

src/Command/GenerateGroupCommand.php, line 137

Class

GenerateGroupCommand
Class GenerateGroupCommand.

Namespace

Drupal\metatag\Command

Code

protected function execute(InputInterface $input, OutputInterface $output) {
  $module = $this
    ->validateModule($input
    ->getOption('module'));
  $base_class = $input
    ->getOption('base_class');
  $label = $input
    ->getOption('label');
  $description = $input
    ->getOption('description');
  $plugin_id = $input
    ->getOption('plugin-id');
  $class_name = $this->validator
    ->validateClassName($input
    ->getOption('class-name'));
  $weight = $input
    ->getOption('weight');
  $this->generator
    ->generate($base_class, $module, $label, $description, $plugin_id, $class_name, $weight);
  $this->chainQueue
    ->addCommand('cache:rebuild', [
    'cache' => 'discovery',
  ]);
}