class SequenceDataDefinition in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Config/Schema/SequenceDataDefinition.php \Drupal\Core\Config\Schema\SequenceDataDefinition
- 9 core/lib/Drupal/Core/Config/Schema/SequenceDataDefinition.php \Drupal\Core\Config\Schema\SequenceDataDefinition
A typed data definition class for defining sequences in configuration.
Hierarchy
- class \Drupal\Core\TypedData\DataDefinition implements \Drupal\Core\TypedData\ArrayAccess, DataDefinitionInterface uses TypedDataTrait
- class \Drupal\Core\TypedData\ListDataDefinition implements ListDataDefinitionInterface
- class \Drupal\Core\Config\Schema\SequenceDataDefinition
- class \Drupal\Core\TypedData\ListDataDefinition implements ListDataDefinitionInterface
Expanded class hierarchy of SequenceDataDefinition
2 files declare their use of SequenceDataDefinition
- StorableConfigBase.php in core/
lib/ Drupal/ Core/ Config/ StorableConfigBase.php - TypedConfigTest.php in core/
tests/ Drupal/ KernelTests/ Config/ TypedConfigTest.php
1 string reference to 'SequenceDataDefinition'
- core.data_types.schema.yml in core/
config/ schema/ core.data_types.schema.yml - core/config/schema/core.data_types.schema.yml
File
- core/
lib/ Drupal/ Core/ Config/ Schema/ SequenceDataDefinition.php, line 10
Namespace
Drupal\Core\Config\SchemaView source
class SequenceDataDefinition extends ListDataDefinition {
/**
* Gets the description of how the sequence should be sorted.
*
* Only the top level of the array should be sorted. Top-level keys should be
* discarded when using 'value' sorting. If the sequence is an associative
* array 'key' sorting is recommended, if not 'value' sorting is recommended.
*
* @return string|null
* May be 'key' (to sort by key), 'value' (to sort by value, discarding
* keys), or NULL (if the schema does not describe how the sequence should
* be sorted).
*/
public function getOrderBy() {
return $this->definition['orderby'] ?? NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DataDefinition:: |
protected | property | The array holding values for all definition keys. | |
DataDefinition:: |
public | function |
Adds a validation constraint. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns a validation constraint. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns an array of validation constraints. Overrides DataDefinitionInterface:: |
1 |
DataDefinition:: |
public | function |
Returns a human readable description. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns a human readable label. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Returns the value of a given setting. Overrides DataDefinitionInterface:: |
2 |
DataDefinition:: |
public | function |
Returns the array of settings, as required by the used class. Overrides DataDefinitionInterface:: |
2 |
DataDefinition:: |
public | function |
Determines whether the data value is computed. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Determines whether the data value is internal. Overrides DataDefinitionInterface:: |
1 |
DataDefinition:: |
public | function |
Returns whether the data is multi-valued, i.e. a list of data items. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Determines whether the data is read-only. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function |
Determines whether a data value is required. Overrides DataDefinitionInterface:: |
|
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | ||
DataDefinition:: |
public | function | Sets the class used for creating the typed data object. | |
DataDefinition:: |
public | function | Sets whether the data is computed. | |
DataDefinition:: |
public | function | Sets an array of validation constraints. | |
DataDefinition:: |
public | function | Sets the human-readable description. | |
DataDefinition:: |
public | function | Sets the whether the data value should be internal. | |
DataDefinition:: |
public | function | Sets the human-readable label. | |
DataDefinition:: |
public | function | Sets whether the data is read-only. | |
DataDefinition:: |
public | function | Sets whether the data is required. | |
DataDefinition:: |
public | function | Sets a definition setting. | 2 |
DataDefinition:: |
public | function | Sets the array of settings, as required by the used class. | 2 |
DataDefinition:: |
public | function | Returns all definition values as array. | |
DataDefinition:: |
public | function | 2 | |
ListDataDefinition:: |
protected | property | The data definition of a list item. | |
ListDataDefinition:: |
public static | function |
Creates a new list definition. Overrides DataDefinition:: |
1 |
ListDataDefinition:: |
public static | function |
Creates a new data definition object. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public static | function |
Creates a new list data definition for items of the given data type. Overrides ListDataDefinitionInterface:: |
1 |
ListDataDefinition:: |
public | function |
Returns the class used for creating the typed data object. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function |
Returns the data type of the data. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function |
Gets the data definition of an item of the list. Overrides ListDataDefinitionInterface:: |
|
ListDataDefinition:: |
public | function |
Sets the data type. Overrides DataDefinition:: |
|
ListDataDefinition:: |
public | function | Sets the item definition. | |
ListDataDefinition:: |
public | function | Magic method: Implements a deep clone. | 1 |
ListDataDefinition:: |
public | function |
Constructs a new data definition object. Overrides DataDefinition:: |
|
SequenceDataDefinition:: |
public | function | Gets the description of how the sequence should be sorted. | |
TypedDataTrait:: |
protected | property | The typed data manager used for creating the data types. | |
TypedDataTrait:: |
public | function | Gets the typed data manager. | 1 |
TypedDataTrait:: |
public | function | Sets the typed data manager. | 1 |