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