Interface CommandCollectionInterface.

This interface describes a collection of commands.

 Methods

Add an command to this collection.

addCommand(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface $command, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface $before) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface

Add commands to this collection.

addCommands(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface[]|array $commands, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface $before) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface

Get command with given name from this collection.

getCommandNamed(string $name) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface

Check if the command exists in this collection.

hasCommand(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface $command) : bool

Parameters

Returns

bool

Check if the command with a given name exists in this collection.

hasCommandNamed(string $name) : bool

Parameters

$name

string

The command name to search.

Returns

bool

Remove an command from this collection.

removeCommand(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface $command) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface

Remove an command with given name from this collection.

removeCommandNamed(string $name) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface

Remove commands from this collection.

removeCommands(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface[]|array $commands) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface

Set the commands of this collection.

setCommands(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface[]|array $commands) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandCollectionInterface