Copied!

FieldDefinitionCollection

FieldDefinitionCollection.php : 19
Extends Countable, IteratorAggregate, ArrayAccess

Methods

publicall()

FieldDefinitionCollection.php : 79

Tests whether the given predicate holds for all elements of this collection.

public all(Closure $predicate) : bool

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

bool

publicany()

FieldDefinitionCollection.php : 84

Tests for the existence of an element that satisfies the given predicate.

public any(Closure $predicate) : bool

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

bool

publicanyInGroup()

FieldDefinitionCollection.php : 94

Tests for the existence of an field definition in given field group.

public anyInGroup(string $fieldGroup) : bool

Parameters

Name Type Default value Description
$fieldGroup string - -

Return values

bool

publicanyOfType()

FieldDefinitionCollection.php : 89

Tests for the existence of an field definition with given field type identifier.

public anyOfType(string $fieldTypeIdentifier) : bool

Parameters

Name Type Default value Description
$fieldTypeIdentifier string - -

Return values

bool

publicfilter()

FieldDefinitionCollection.php : 58

Returns all the elements of this collection that satisfy the predicate p.

public filter(Closure $predicate) : FieldDefinitionCollection

The order of the elements is preserved.

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

FieldDefinitionCollection

publicfilterByGroup()

FieldDefinitionCollection.php : 68

Returns field definitions with given group.

public filterByGroup(string $fieldGroup) : FieldDefinitionCollection

Parameters

Name Type Default value Description
$fieldGroup string - -

Return values

FieldDefinitionCollection

publicfilterByType()

FieldDefinitionCollection.php : 63

Returns field definitions with given field type identifier.

public filterByType(string $fieldTypeIdentifier) : FieldDefinitionCollection

Parameters

Name Type Default value Description
$fieldTypeIdentifier string - -

Return values

FieldDefinitionCollection

publicfirst()

FieldDefinitionCollection.php : 38

Return first element of collection.

public first() : FieldDefinition

Return values

FieldDefinition

Tags
Throws
OutOfBoundsException

publicget()

FieldDefinitionCollection.php : 26

This method returns the field definition for the given identifier.

public get(string $fieldDefinitionIdentifier) : FieldDefinition

Parameters

Name Type Default value Description
$fieldDefinitionIdentifier string - -

Return values

FieldDefinition

Tags
Throws
OutOfBoundsException

publichas()

FieldDefinitionCollection.php : 31

This method returns true if the field definition for the given identifier exists.

public has(string $fieldDefinitionIdentifier) : bool

Parameters

Name Type Default value Description
$fieldDefinitionIdentifier string - -

Return values

bool

publicisEmpty()

FieldDefinitionCollection.php : 52

Checks whether the collection is empty (contains no elements).

public isEmpty() : bool

Return values

bool

TRUE if the collection is empty, FALSE otherwise.

publiclast()

FieldDefinitionCollection.php : 45

Return last element of collection.

public last() : FieldDefinition

Return values

FieldDefinition

Tags
Throws
OutOfBoundsException

publicmap()

FieldDefinitionCollection.php : 74

Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.

public map(Closure $predicate) : array<string|int, mixed>

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

array<string|int, mixed>

publicpartition()

FieldDefinitionCollection.php : 105

Partitions this collection in two collections according to a predicate.

public partition(Closure $predicate) : array<string|int, FieldDefinitionCollection>

Result is an array with two elements. The first element contains the collection of elements where the predicate returned TRUE, the second element contains the collection of elements where the predicate returned FALSE.

Parameters

Name Type Default value Description
$predicate Closure - -

Return values

array<string|int, FieldDefinitionCollection>

publictoArray()

FieldDefinitionCollection.php : 112

Gets a native PHP array representation of the collection.

public toArray() : array<string|int, FieldDefinition>

Return values

array<string|int, FieldDefinition>