FieldDefinitionCollection
Methods¶
all()
¶
Tests whether the given predicate holds for all elements of this collection.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
bool
any()
¶
Tests for the existence of an element that satisfies the given predicate.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
bool
anyInGroup()
¶
Tests for the existence of an field definition in given field group.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$fieldGroup | string | - | - |
Return values
bool
anyOfType()
¶
Tests for the existence of an field definition with given field type identifier.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$fieldTypeIdentifier | string | - | - |
Return values
bool
filter()
¶
Returns all the elements of this collection that satisfy the predicate p.
|
|
The order of the elements is preserved.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
filterByGroup()
¶
Returns field definitions with given group.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$fieldGroup | string | - | - |
Return values
filterByType()
¶
Returns field definitions with given field type identifier.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$fieldTypeIdentifier | string | - | - |
Return values
first()
¶
Return first element of collection.
|
|
Return values
Tags
get()
¶
This method returns the field definition for the given identifier.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$fieldDefinitionIdentifier | string | - | - |
Return values
Tags
has()
¶
This method returns true if the field definition for the given identifier exists.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$fieldDefinitionIdentifier | string | - | - |
Return values
bool
isEmpty()
¶
Checks whether the collection is empty (contains no elements).
|
|
Return values
bool
TRUE if the collection is empty, FALSE otherwise.
last()
¶
Return last element of collection.
|
|
Return values
Tags
map()
¶
Applies the given function to each element in the collection and returns a new collection with the elements returned by the function.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$predicate | Closure | - | - |
Return values
array<string|int, mixed>
partition()
¶
Partitions this collection in two collections according to a predicate.
|
|
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>
toArray()
¶
Gets a native PHP array representation of the collection.
|
|
Return values
array<string|int, FieldDefinition>