TypedData::getPropertyPath

public TypedData::getPropertyPath() Returns the property path of the data. The trail of property names relative to the root of the typed data tree, separated by dots; e.g. 'field_text.0.format'. Return value string The property path relative to the root of the typed tree, or an empty string if this is the root. Overrides TypedDataInterface::getPropertyPath File core/lib/Drupal/Core/TypedData/TypedData.php, line 176 Class TypedData The abstract base class for typed data. Namespace Drupa

TypedData::getRoot

public TypedData::getRoot() Returns the root of the typed data tree. Returns the root data for a tree of typed data objects; e.g. for an entity field item the root of the tree is its parent entity object. Return value \Drupal\Core\TypedData\TraversableTypedDataInterface The root data structure, either complex data or a list. Overrides TypedDataInterface::getRoot File core/lib/Drupal/Core/TypedData/TypedData.php, line 165 Class TypedData The abstract base class for typed data. Namespace

TypedData::getString

public TypedData::getString() Returns a string representation of the data. Return value string Overrides TypedDataInterface::getString File core/lib/Drupal/Core/TypedData/TypedData.php, line 115 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code public function getString() { return (string) $this->getValue(); }

TypedData::getValue

public TypedData::getValue() Gets the data value. Return value mixed Overrides TypedDataInterface::getValue File core/lib/Drupal/Core/TypedData/TypedData.php, line 97 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code public function getValue() { return $this->value; }

TypedData::setContext

public TypedData::setContext($name = NULL, TraversableTypedDataInterface $parent = NULL) Sets the context of a property or item via a context aware parent. This method is supposed to be called by the factory only. Parameters string|null $name: (optional) The name of the property or the delta of the list item, or NULL if it is the root of a typed data tree. Defaults to NULL. \Drupal\Core\TypedData\TraversableTypedDataInterface|null $parent: (optional) The parent object of the data property, or

TypedData::setValue

public TypedData::setValue($value, $notify = TRUE) Sets the data value. Parameters mixed|null $value: The value to set in the format as documented for the data type or NULL to unset the data value. bool $notify: (optional) Whether to notify the parent object of the change. Defaults to TRUE. If a property is updated from a parent object, set it to FALSE to avoid being notified again. Throws \InvalidArgumentException If the value input is inappropriate. \Drupal\Core\TypedData\Exception\ReadOnly

TypedData::validate

public TypedData::validate() Validates the currently set data value. Return value \Symfony\Component\Validator\ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded. Overrides TypedDataInterface::validate File core/lib/Drupal/Core/TypedData/TypedData.php, line 134 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code public function validate() { return $this->getTypedDataManager()->ge

TypedData::__construct

public TypedData::__construct($definition, $name = NULL, TypedDataInterface $parent = NULL) Constructs a TypedData object given its definition and context. @todo When \Drupal\Core\Config\TypedConfigManager has been fixed to use class-based definitions, type-hint $definition to DataDefinitionInterface. https://www.drupal.org/node/1928868 Parameters \Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition. string $name: (optional) The name of the created property, or NULL

TypedData::__sleep

public TypedData::__sleep() File core/lib/Drupal/Core/TypedData/TypedData.php, line 201 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code public function __sleep() { $vars = get_object_vars($this); // Prevent services from being serialized. static::getStringTranslation() // and static::getTypedDataManager() lazy-load them after $this has been // unserialized. // @todo Replace this with // \Drupal\Core\DependencyInjection\Dependen

TypedDataInterface

Interface for typed data objects. Hierarchy interface \Drupal\Core\TypedData\TypedDataInterface See also \Drupal\Core\TypedData\DataDefinitionInterface Related topics Typed Data API API for describing data based on a set of available data types. File core/lib/Drupal/Core/TypedData/TypedDataInterface.php, line 12 Namespace Drupal\Core\TypedData Members Name Modifiers Type Description TypedDataInterface::applyDefaultValue public function Applies the default value. Typ