This interface defines a collection of grouping and sorting information for the view.

 Methods

Add a new information - optionally at the given position.

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

Parameters

$index

int

Target position for the new information.

Returns

Retrieve the information at the given position.

get(int $index) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingDefinitionInterface
If the given index is out of bounds (less than zero or greater than the amount of information) an exception is fired.

Parameters

$index

int

Position of the information. Default: -1 meaning the default information.

Returns

Retrieve the amount of information.

getCount() : int

Returns

int

Retrieve the index of the default definition.

getDefaultIndex() : int

Returns

int

Check if a default information is present.

hasDefault() : bool

Returns

bool

Mark an information as the default.

markDefault(int|\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingDefinitionInterface $information) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\GroupAndSortingDefinitionCollectionInterface