interface TypedConfigInterface

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

Interface for a typed configuration object that contains multiple elements.

A list of typed configuration contains any number of items whose type will depend on the configuration schema but also on the configuration data being parsed.

When implementing this interface which extends Traversable, make sure to list IteratorAggregate or Iterator before this interface in the implements clause.

Hierarchy

Expanded class hierarchy of TypedConfigInterface

All classes that implement TypedConfigInterface

1 file declares its use of TypedConfigInterface
TypedConfigTest.php in core/tests/Drupal/KernelTests/Config/TypedConfigTest.php

File

core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php, line 17

Namespace

Drupal\Core\Config\Schema
View source
interface TypedConfigInterface extends TraversableTypedDataInterface {
  
  /**
   * Determines whether the data structure is empty.
   *
   * @return bool
   *   TRUE if the data structure is empty, FALSE otherwise.
   */
  public function isEmpty();
  
  /**
   * Gets an array of contained elements.
   *
   * @return array
   *   Array of \Drupal\Core\TypedData\TypedDataInterface objects.
   */
  public function getElements();
  
  /**
   * Gets a contained typed configuration element.
   *
   * @param $name
   *   The name of the property to get; e.g., 'title' or 'name'. Nested
   *   elements can be get using multiple dot delimited names, for example,
   *   'page.front'.
   *
   * @return \Drupal\Core\TypedData\TypedDataInterface
   *   The property object.
   *
   * @throws \InvalidArgumentException
   *   If an invalid property name is given.
   */
  public function get($name);
  
  /**
   * Returns an array of all property values.
   *
   * @return array
   *   An array of property values, keyed by property name.
   */
  public function toArray();

}

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