1. 8.5.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND
  2. 8.0.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND
  3. 8.1.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND
  4. 8.2.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND
  5. 8.3.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND
  6. 8.4.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND
  7. 8.6.x vendor/symfony/console/ConsoleEvents.php ConsoleEvents::COMMAND

The COMMAND event allows you to attach listeners before any command is executed by the console. It also allows you to modify the command, input and output before they are handled to the command.

The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent instance.

Related topics

File

vendor/symfony/console/ConsoleEvents.php, line 33

Class

ConsoleEvents
Contains all events dispatched by an Application.

Namespace

Symfony\Component\Console

Code

const COMMAND = 'console.command';