Handy helper class to generate and manipulate filter arrays.

 Methods

Create a new instance.

__construct(array $filter, bool $isRoot) 

Parameters

$filter

array

Optional base filter array.

$isRoot

bool

Flag determining if the current filter is a root filter.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException When an invalid filter array has been passed.

Check that an given argument is a valid operation.

checkValidOperation(string $operation) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder

Parameters

$operation

string

The operation to check.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException When an invalid operation name has been passed.

Returns

Create a new instance from an array.

fromArray(array $filter) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder
Static

Parameters

$filter

array

The initial filter array (optional).

Returns

Create a new instance from an array for a root filter.

fromArrayForRoot(array $filter) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder
Static

Parameters

$filter

array

The initial filter array (optional).

Returns

Return the current filters.

getAllAsArray() : array

Returns

array

Instantiate the correct builder class from a given filter array.

getBuilderFromArray(array $filter, \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder $builder) : \ContaoCommunityAlliance\DcGeneral\DataDefinition\ModelRelationship\FilterBuilder\BaseFilterBuilder
Static

Determine if this builder is for a root filter or not.

isRootFilter() : bool

Returns

bool

Check if an given argument is a valid operation.

isValidOperation(string $operation) : bool
Static

Parameters

$operation

string

The operation to check.

Returns

bool

 Properties

   

Flag determining if the current filter is a root filter or parent child filter.

$isRootFilter : bool