class Sequence

Defines a configuration element of type Sequence.

Hierarchy

Expanded class hierarchy of Sequence

2 string references to 'Sequence'
system.data_types.schema.yml in drupal/core/modules/system/config/schema/system.data_types.schema.yml
drupal/core/modules/system/config/schema/system.data_types.schema.yml
system.data_types.schema.yml in drupal/core/modules/system/config/schema/system.data_types.schema.yml
drupal/core/modules/system/config/schema/system.data_types.schema.yml

File

drupal/core/lib/Drupal/Core/Config/Schema/Sequence.php, line 15
Contains \Drupal\Core\Config\Schema\Sequence.

Namespace

Drupal\Core\Config\Schema
View source
class Sequence extends ArrayElement implements ListInterface {

  /**
   * Overrides ArrayElement::parse()
   */
  protected function parse() {
    $definition = $definition = $this
      ->getItemDefinition();
    $elements = array();
    foreach ($this->value as $key => $value) {
      $elements[$key] = $this
        ->parseElement($key, $value, $definition);
    }
    return $elements;
  }

  /**
   * Implements Drupal\Core\TypedData\ListInterface::isEmpty().
   */
  public function isEmpty() {
    return empty($this->value);
  }

  /**
   * Implements Drupal\Core\TypedData\ListInterface::getItemDefinition().
   */
  public function getItemDefinition() {
    return $this->definition['sequence'][0];
  }

  /**
   * Implements \Drupal\Core\TypedData\ListInterface::onChange().
   */
  public function onChange($delta) {

    // Notify the parent of changes.
    if (isset($this->parent)) {
      $this->parent
        ->onChange($this->name);
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ArrayElement::$elements protected property Parsed elements.
ArrayElement::count public function Implements Countable::count().
ArrayElement::getAllKeys protected function Gets valid configuration data keys.
ArrayElement::getElements protected function Gets an array of contained elements.
ArrayElement::getIterator public function Implements IteratorAggregate::getIterator();
ArrayElement::offsetExists public function Implements ArrayAccess::offsetExists().
ArrayElement::offsetGet public function Implements ArrayAccess::offsetGet().
ArrayElement::offsetSet public function Implements ArrayAccess::offsetSet().
ArrayElement::offsetUnset public function Implements ArrayAccess::offsetUnset().
ArrayElement::validate public function Implements TypedDataInterface::validate(). Overrides TypedData::validate
Element::$value protected property The configuration value.
Element::parseElement protected function Create typed config object.
Sequence::getItemDefinition public function Implements Drupal\Core\TypedData\ListInterface::getItemDefinition(). Overrides ListInterface::getItemDefinition
Sequence::isEmpty public function Implements Drupal\Core\TypedData\ListInterface::isEmpty(). Overrides ListInterface::isEmpty
Sequence::onChange public function Implements \Drupal\Core\TypedData\ListInterface::onChange(). Overrides ListInterface::onChange
Sequence::parse protected function Overrides ArrayElement::parse() Overrides ArrayElement::parse
TypedData::$definition protected property The data definition.
TypedData::$name protected property The property name.
TypedData::$parent protected property The parent typed data object.
TypedData::getConstraints public function Implements \Drupal\Core\TypedData\TypedDataInterface::getConstraints(). Overrides TypedDataInterface::getConstraints 2
TypedData::getDefinition public function Implements \Drupal\Core\TypedData\TypedDataInterface::getDefinition(). Overrides TypedDataInterface::getDefinition
TypedData::getName public function Implements \Drupal\Core\TypedData\TypedDataInterface::getName(). Overrides TypedDataInterface::getName
TypedData::getParent public function Implements \Drupal\Core\TypedData\TypedDataInterface::getParent(). Overrides TypedDataInterface::getParent
TypedData::getPropertyPath public function Implements \Drupal\Core\TypedData\TypedDataInterface::getPropertyPath(). Overrides TypedDataInterface::getPropertyPath
TypedData::getRoot public function Implements \Drupal\Core\TypedData\TypedDataInterface::getRoot(). Overrides TypedDataInterface::getRoot
TypedData::getString public function Implements \Drupal\Core\TypedData\TypedDataInterface::getString(). Overrides TypedDataInterface::getString 7
TypedData::getType public function Implements \Drupal\Core\TypedData\TypedDataInterface::getType(). Overrides TypedDataInterface::getType
TypedData::getValue public function Implements \Drupal\Core\TypedData\TypedDataInterface::getValue(). Overrides TypedDataInterface::getValue 8
TypedData::setContext public function Implements \Drupal\Core\TypedData\TypedDataInterface::setContext(). Overrides TypedDataInterface::setContext 1
TypedData::setValue public function Implements \Drupal\Core\TypedData\TypedDataInterface::setValue(). Overrides TypedDataInterface::setValue 10
TypedData::__construct public function Constructs a TypedData object given its definition and context. 5