Documentation

GroupDefinition extends CommandDefinition

Table of Contents

$Command  : string
$commandMode  : string
$description  : string
$group  : GroupDefinition
$name  : string
$BeforeAction  : string
Action to run before any command of this group
$beforeActionParams  : array<string|int, mixed>
Params for the before action
$defaultCommandName  : string
Name of a command to be run as default for this group
$definitions  : array<string|int, mixed>
List of sub commands / groups
$noCommandsMessage  : string
Message shown if no commands are available
beforeAction()  : GroupDefinition
Define an action to run before any command of this group
command()  : GroupDefinition
Add a command
default()  : GroupDefinition
Set a command of this group to be run instead of the index
definitionsToCommands()  : array<string|int, mixed>
Converts command definitions to actual commands
getBeforeAction()  : string|null
Return the before action
getBeforeActionParams()  : array<string|int, mixed>
Return the before action params
getDefaultCommandName()  : string|null
Returns the default command name
getNoCommandsMessage()  : string|null
Returns the no commands available message
group()  : GroupDefinition
Add a group
noCommandAvailable()  : GroupDefinition
Set a message shown if no command is available in this group
toArray()  : mixed

Properties

$BeforeAction

Action to run before any command of this group

protected string $BeforeAction

$beforeActionParams

Params for the before action

protected array<string|int, mixed> $beforeActionParams = []

$defaultCommandName

Name of a command to be run as default for this group

protected string $defaultCommandName

$definitions

List of sub commands / groups

protected array<string|int, mixed> $definitions = []

$noCommandsMessage

Message shown if no commands are available

protected string $noCommandsMessage

Methods

beforeAction()

Define an action to run before any command of this group

public beforeAction(string $BeforeAction[, array<string|int, mixed> $params = [] ]) : GroupDefinition
Parameters
$BeforeAction : string
$params : array<string|int, mixed> = []
Return values
GroupDefinition

definitionsToCommands()

Converts command definitions to actual commands

public definitionsToCommands(Application $app[, Command|null $parentCommand = null ]) : array<string|int, mixed>
Parameters
$app : Application
$parentCommand : Command|null = null
Return values
array<string|int, mixed>

getBeforeAction()

Return the before action

public getBeforeAction() : string|null
Return values
string|null

getBeforeActionParams()

Return the before action params

public getBeforeActionParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultCommandName()

Returns the default command name

public getDefaultCommandName() : string|null
Return values
string|null

getNoCommandsMessage()

Returns the no commands available message

public getNoCommandsMessage() : string|null
Return values
string|null

Search results