ComplexDataInterface::toArray

public ComplexDataInterface::toArray() Returns an array of all property values. Gets an array of plain property values including all not-computed properties. Return value array An array of property values, keyed by property name. Throws \Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no property can be created. File core/lib/Drupal/Core/TypedData/ComplexDataInterface.php, line 95 Class ComplexDataInterface Interface for complex data; i.e.

ComplexDataInterface::set

public ComplexDataInterface::set($property_name, $value, $notify = TRUE) Sets a property value. Parameters $property_name: The name of the property to set; e.g., 'title' or 'name'. $value: The value to set, or NULL to unset the property. bool $notify: (optional) Whether to notify the parent object of the change. Defaults to TRUE. If the update stems from a parent object, set it to FALSE to avoid being notified again. Return value $this Throws \InvalidArgumentException If the specified proper

ComplexDataInterface::isEmpty

public ComplexDataInterface::isEmpty() Determines whether the data structure is empty. Return value bool TRUE if the data structure is empty, FALSE otherwise. File core/lib/Drupal/Core/TypedData/ComplexDataInterface.php, line 103 Class ComplexDataInterface Interface for complex data; i.e. data containing named and typed properties. Namespace Drupal\Core\TypedData Code public function isEmpty();

ComplexDataInterface::getProperties

public ComplexDataInterface::getProperties($include_computed = FALSE) Gets an array of property objects. Parameters bool $include_computed: If set to TRUE, computed properties are included. Defaults to FALSE. Return value \Drupal\Core\TypedData\TypedDataInterface[] An array of property objects implementing the TypedDataInterface, keyed by property name. Throws \Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no property can be created. File cor

ComplexDataInterface::getDataDefinition

public ComplexDataInterface::getDataDefinition() Gets the data definition. Return value \Drupal\Core\TypedData\ComplexDataDefinitionInterface The data definition object describing the complex data. Overrides TypedDataInterface::getDataDefinition File core/lib/Drupal/Core/TypedData/ComplexDataInterface.php, line 29 Class ComplexDataInterface Interface for complex data; i.e. data containing named and typed properties. Namespace Drupal\Core\TypedData Code public function getDataDefinitio

ComplexDataInterface::get

public ComplexDataInterface::get($property_name) Gets a property object. Parameters $property_name: The name of the property to get; e.g., 'title' or 'name'. Return value \Drupal\Core\TypedData\TypedDataInterface The property object. Throws \InvalidArgumentException If an invalid property name is given. \Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no property can be created. File core/lib/Drupal/Core/TypedData/ComplexDataInterface.php, line

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 interface \Drupal\Core\TypedData\TypedDataInterfaceinterface \Drupal\Core\Typed

ComplexDataDefinitionInterface::getPropertyDefinitions

public ComplexDataDefinitionInterface::getPropertyDefinitions() Gets an array of property definitions of contained properties. Return value \Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name. File core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php, line 32 Class ComplexDataDefinitionInterface Interface for complex data definitions. Namespace Drupal\Core\TypedData Code public function getPrope

ComplexDataDefinitionInterface::getPropertyDefinition

public ComplexDataDefinitionInterface::getPropertyDefinition($name) Gets the definition of a contained property. Parameters string $name: The name of property. Return value \Drupal\Core\TypedData\DataDefinitionInterface|null The definition of the property or NULL if the property does not exist. File core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php, line 23 Class ComplexDataDefinitionInterface Interface for complex data definitions. Namespace Drupal\Core\TypedData Cod

ComplexDataDefinitionInterface::getMainPropertyName

public ComplexDataDefinitionInterface::getMainPropertyName() Returns the name of the main property, if any. Some field items consist mainly of one main property, e.g. the value of a text field or the target_id of an entity reference. If the field item has no main property, the method returns NULL. Return value string|null The name of the value property, or NULL if there is none. File core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php, line 44 Class ComplexDataDefinitionInt