class ConsoleSubExampleCommand

Same name and namespace in other branches
  1. main core/modules/system/tests/modules/console_test/src/Command/Sub/ConsoleSubExampleCommand.php \Drupal\console_test\Command\Sub\ConsoleSubExampleCommand

An example command in a subdirectory.

@internal

Attributes

#[AsCommand(name: 'example:sub:command', description: 'An example command in a subdirectory.')]

Hierarchy

Expanded class hierarchy of ConsoleSubExampleCommand

File

core/modules/system/tests/modules/console_test/src/Command/Sub/ConsoleSubExampleCommand.php, line 18

Namespace

Drupal\console_test\Command\Sub
View source
class ConsoleSubExampleCommand extends Command {
  
  /**
   * {@inheritdoc}
   */
  protected function execute(InputInterface $input, OutputInterface $output) : int {
    $io = new SymfonyStyle($input, $output);
    $io->success('Done.');
    return Command::SUCCESS;
  }

}

Members

Title Sort descending Modifiers Object type Summary
ConsoleSubExampleCommand::execute protected function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.