3 namespace Drupal\Core\Config\Schema;
5 use Drupal\Core\TypedData\TraversableTypedDataInterface;
8 * Interface for a typed configuration object that contains multiple elements.
10 * A list of typed configuration contains any number of items whose type
11 * will depend on the configuration schema but also on the configuration
14 * When implementing this interface which extends Traversable, make sure to list
15 * IteratorAggregate or Iterator before this interface in the implements clause.
17 interface TypedConfigInterface extends TraversableTypedDataInterface {
20 * Determines whether the data structure is empty.
23 * TRUE if the data structure is empty, FALSE otherwise.
25 public function isEmpty();
28 * Gets an array of contained elements.
31 * Array of \Drupal\Core\TypedData\TypedDataInterface objects.
33 public function getElements();
36 * Gets a contained typed configuration element.
39 * The name of the property to get; e.g., 'title' or 'name'. Nested
40 * elements can be get using multiple dot delimited names, for example,
43 * @return \Drupal\Core\TypedData\TypedDataInterface
44 * The property object.
46 * @throws \InvalidArgumentException
47 * If an invalid property name is given.
49 public function get($name);
52 * Returns an array of all property values.
55 * An array of property values, keyed by property name.
57 public function toArray();