interface TypedConfigInterface
Same name in other branches
- 9 core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php \Drupal\Core\Config\Schema\TypedConfigInterface
- 8.9.x core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php \Drupal\Core\Config\Schema\TypedConfigInterface
- 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
- interface \Drupal\Core\TypedData\TypedDataInterface
- interface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Drupal\Core\TypedData\TypedDataInterface \Drupal\Core\TypedData\Traversable
- interface \Drupal\Core\Config\Schema\TypedConfigInterface extends \Drupal\Core\TypedData\TraversableTypedDataInterface
- interface \Drupal\Core\TypedData\TraversableTypedDataInterface extends \Drupal\Core\TypedData\TypedDataInterface \Drupal\Core\TypedData\Traversable
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\SchemaView 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();
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
TraversableTypedDataInterface::onChange | public | function | React to changes to a child property or item. | 4 |
TypedConfigInterface::get | public | function | Gets a contained typed configuration element. | 1 |
TypedConfigInterface::getElements | public | function | Gets an array of contained elements. | 1 |
TypedConfigInterface::isEmpty | public | function | Determines whether the data structure is empty. | 1 |
TypedConfigInterface::toArray | public | function | Returns an array of all property values. | 1 |
TypedDataInterface::applyDefaultValue | public | function | Applies the default value. | 1 |
TypedDataInterface::createInstance | public static | function | Constructs a TypedData object given its definition and context. | 1 |
TypedDataInterface::getConstraints | public | function | Gets a list of validation constraints. | 1 |
TypedDataInterface::getDataDefinition | public | function | Gets the data definition. | 3 |
TypedDataInterface::getName | public | function | Returns the name of a property or item. | 1 |
TypedDataInterface::getParent | public | function | Returns the parent data structure; i.e. either complex data or a list. | 1 |
TypedDataInterface::getPropertyPath | public | function | Returns the property path of the data. | 1 |
TypedDataInterface::getRoot | public | function | Returns the root of the typed data tree. | 1 |
TypedDataInterface::getString | public | function | Returns a string representation of the data. | 1 |
TypedDataInterface::getValue | public | function | Gets the data value. | 1 |
TypedDataInterface::setContext | public | function | Sets the context of a property or item via a context aware parent. | 1 |
TypedDataInterface::setValue | public | function | Sets the data value. | 1 |
TypedDataInterface::validate | public | function | Validates the currently set data value. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.