TYPO3  7.6
Public Member Functions | Public Attributes | Private Attributes | List of all members
ConsoleCommandEvent Class Reference
Inheritance diagram for ConsoleCommandEvent:
ConsoleEvent

Public Member Functions

 disableCommand ()
 
 enableCommand ()
 
 commandShouldRun ()
 
- Public Member Functions inherited from ConsoleEvent
 __construct (Command $command, InputInterface $input, OutputInterface $output)
 
 getCommand ()
 
 getInput ()
 
 getOutput ()
 

Public Attributes

const RETURN_CODE_DISABLED = 113
 

Private Attributes

 $commandShouldRun = true
 

Additional Inherited Members

- Protected Attributes inherited from ConsoleEvent
 $command
 

Detailed Description

Allows to do things before the command is executed, like skipping the command or changing the input.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 19 of file ConsoleCommandEvent.php.

Member Function Documentation

commandShouldRun ( )

Returns true if the command is runnable, false otherwise.

Returns
bool

Definition at line 58 of file ConsoleCommandEvent.php.

References ConsoleCommandEvent\$commandShouldRun.

Referenced by ConsoleCommandEvent\disableCommand(), and ConsoleCommandEvent\enableCommand().

disableCommand ( )

Disables the command, so it won't be run.

Returns
bool

Definition at line 38 of file ConsoleCommandEvent.php.

References ConsoleCommandEvent\commandShouldRun().

Referenced by ApplicationTest\getDispatcher().

enableCommand ( )

Enables the command.

Returns
bool

Definition at line 48 of file ConsoleCommandEvent.php.

References ConsoleCommandEvent\commandShouldRun().

Member Data Documentation

$commandShouldRun = true
private

Definition at line 31 of file ConsoleCommandEvent.php.

Referenced by ConsoleCommandEvent\commandShouldRun().

const RETURN_CODE_DISABLED = 113

The return code for skipped commands, this will also be passed into the terminate event.

Definition at line 24 of file ConsoleCommandEvent.php.

Referenced by Application\doRunCommand(), and ApplicationTest\testRunWithDispatcherSkippingCommand().