Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / web / core / lib / Drupal / Core / Config / Schema / SequenceDataDefinition.php
1 <?php
2
3 namespace Drupal\Core\Config\Schema;
4
5 use Drupal\Core\TypedData\ListDataDefinition;
6
7 /**
8  * A typed data definition class for defining sequences in configuration.
9  */
10 class SequenceDataDefinition extends ListDataDefinition {
11
12   /**
13    * Gets the description of how the sequence should be sorted.
14    *
15    * Only the top level of the array should be sorted. Top-level keys should be
16    * discarded when using 'value' sorting. If the sequence is an associative
17    * array 'key' sorting is recommended, if not 'value' sorting is recommended.
18    *
19    * @return string|null
20    *   May be 'key' (to sort by key), 'value' (to sort by value, discarding
21    *   keys), or NULL (if the schema does not describe how the sequence should
22    *   be sorted).
23    */
24   public function getOrderBy() {
25     return isset($this->definition['orderby']) ? $this->definition['orderby'] : NULL;
26   }
27
28 }