Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GenerateProxyClassCommand.php

function GenerateProxyClassCommand::configure

Overrides Command::configure

File

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

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\\my_module\\MyClass\' "modules/contrib/my_module/src"');
}
RSS feed
Powered by Drupal