class SequenceDataDefinition

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Config/Schema/SequenceDataDefinition.php \Drupal\Core\Config\Schema\SequenceDataDefinition

A typed data definition class for defining sequences in configuration.

Hierarchy

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\Schema
View 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;
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.