ComplexDataInterface

Interface for complex data; i.e. data containing named and typed properties.

The name of a property has to be a valid PHP variable name, starting with an alphabetic character.

This is implemented by entities as well as by field item classes of entities.

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

Hierarchy

See also

\Drupal\Core\TypedData\ComplexDataDefinitionInterface

Related topics

Typed Data API
API for describing data based on a set of available data types.

File

core/lib/Drupal/Core/TypedData/ComplexDataInterface.php, line 21

Namespace

Drupal\Core\TypedData

Members

Name Modifiers Type Description
ComplexDataInterface::get public function Gets a property object.
ComplexDataInterface::getDataDefinition public function Gets the data definition. Overrides TypedDataInterface::getDataDefinition
ComplexDataInterface::getProperties public function Gets an array of property objects.
ComplexDataInterface::isEmpty public function Determines whether the data structure is empty.
ComplexDataInterface::set public function Sets a property value.
ComplexDataInterface::toArray public function Returns an array of all property values.
TraversableTypedDataInterface::onChange public function React to changes to a child property or item.
TypedDataInterface::applyDefaultValue public function Applies the default value.
TypedDataInterface::createInstance public static function Constructs a TypedData object given its definition and context.
TypedDataInterface::getConstraints public function Gets a list of validation constraints.
TypedDataInterface::getName public function Returns the name of a property or item.
TypedDataInterface::getParent public function Returns the parent data structure; i.e. either complex data or a list.
TypedDataInterface::getPropertyPath public function Returns the property path of the data.
TypedDataInterface::getRoot public function Returns the root of the typed data tree.
TypedDataInterface::getString public function Returns a string representation of the data.
TypedDataInterface::getValue public function Gets the data value.
TypedDataInterface::setContext public function Sets the context of a property or item via a context aware parent.
TypedDataInterface::setValue public function Sets the data value.
TypedDataInterface::validate public function Validates the currently set data value.
doc_Drupal
2016-10-29 08:51:39
Comments
Leave a Comment

Please login to continue.