You are here

protected function GenerateProxyClassCommand::configure in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php \Drupal\Core\Command\GenerateProxyClassCommand::configure()

Configures the current command.

Overrides Command::configure

File

core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php, line 43
Contains \Drupal\Core\Command\GenerateProxyClassCommand.

Class

GenerateProxyClassCommand
Provides a console command to generate proxy classes.

Namespace

Drupal\Core\Command

Code

protected function configure() {
  $this
    ->setName('generate-proxy-class')
    ->setDefinition([
    new InputArgument('class_name', InputArgument::REQUIRED, 'The class to be proxied'),
    new InputArgument('namespace_root_path', InputArgument::REQUIRED, 'The filepath to the root of the namespace.'),
  ])
    ->setDescription('Dumps a generated proxy class into its appropriate namespace.')
    ->addUsage('\'Drupal\\Core\\Batch\\BatchStorage\' "core/lib/Drupal/Core"')
    ->addUsage('\'Drupal\\block\\BlockRepository\' "core/modules/block/src"')
    ->addUsage('\'Drupal\\mymodule\\MyClass\' "modules/contrib/mymodule/src"');
}