This interface describes a panel row definition.

 Methods

Add an element at the end of the row or - optionally - at the given position.

addElement(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\Panel\ElementInformationInterface $element, int $index) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface
If the given position is zero or any other positive value, the element will get placed at the given position. If the index is negative or greater than the total amount of rows present, the new element will get placed at the end of the list.

Parameters

$index

int

Target position for the element.

Returns

Remove the element with the given index (if numeric) or name (if string).

deleteElement(int|string|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\Panel\ElementInformationInterface $indexOrNameOrInstance) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\PanelRowInterface
SuppressWarnings (PHPMD.LongVariable)

Parameters

$indexOrNameOrInstance

intstring\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\Panel\ElementInformationInterface

Element name or numeric index in the row.

Returns

Retrieve the amount of elements.

getCount() : int

Returns

int

Retrieve the element with the given index (if numeric) or name (if string).

getElement(int|string $indexOrName) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\Panel\ElementInformationInterface

Parameters

$indexOrName

intstring

Element name or numeric index in the row.

Returns

Return the names of the contained panel elements.

getElements() : array
This will return the following for example: array('filter[prop1]', 'filter[prop2]', 'search', 'limit')

Returns

array

Check if the given element instance or an element with the given name is in the row.

hasElement(\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\Panel\ElementInformationInterface|string $instanceOrName) : bool
Throws an exception when an invalid value has been passed.

Parameters

$instanceOrName

\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\Panel\ElementInformationInterfacestring

The element instance or the name of an element to check.

Returns

bool