You are here

protected function GenerateProxyClassCommand::configure in Drupal 9

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

File

core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php, line 38

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"');
}