class ConsoleExampleConfigureCommand
Same name and namespace in other branches
- main core/modules/system/tests/modules/console_test/src/Command/ConsoleExampleConfigureCommand.php \Drupal\console_test\Command\ConsoleExampleConfigureCommand
An example command using configure() instead of the AsCommand attribute.
@internal
Hierarchy
- class \Drupal\console_test\Command\ConsoleExampleConfigureCommand extends \Symfony\Component\Console\Command\Command
Expanded class hierarchy of ConsoleExampleConfigureCommand
1 file declares its use of ConsoleExampleConfigureCommand
- ConsoleTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Console/ ConsoleTest.php
File
-
core/
modules/ system/ tests/ modules/ console_test/ src/ Command/ ConsoleExampleConfigureCommand.php, line 17
Namespace
Drupal\console_test\CommandView source
class ConsoleExampleConfigureCommand extends Command {
/**
* {@inheritdoc}
*/
protected function configure() : void {
$this->setName('example:command-configured');
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output) : int {
$io = new SymfonyStyle($input, $output);
$io->success('Done with configured command.');
return Command::SUCCESS;
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| ConsoleExampleConfigureCommand::configure | protected | function | |
| ConsoleExampleConfigureCommand::execute | protected | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.