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::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::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::getParent

public TypedData::getParent() Returns the parent data structure; i.e. either complex data or a list. Return value \Drupal\Core\TypedData\TraversableTypedDataInterface|null The parent data structure, either complex data or a list; or NULL if this is the root of the typed data tree. Overrides TypedDataInterface::getParent File core/lib/Drupal/Core/TypedData/TypedData.php, line 194 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code public functio

TypedData::getName

public TypedData::getName() Returns the name of a property or item. Return value string If the data is a property of some complex data, the name of the property. If the data is an item of a list, the name is the numeric position of the item in the list, starting with 0. Otherwise, NULL is returned. Overrides TypedDataInterface::getName File core/lib/Drupal/Core/TypedData/TypedData.php, line 158 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Cod

TypedData::getDataDefinition

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

TypedData::getConstraints

public TypedData::getConstraints() Gets a list of validation constraints. Return value array Array of constraints, each being an instance of \Symfony\Component\Validator\Constraint. Overrides TypedDataInterface::getConstraints File core/lib/Drupal/Core/TypedData/TypedData.php, line 122 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code public function getConstraints() { $constraint_manager = $this->getTypedDataManager()->getValidationC

TypedData::createInstance

public static TypedData::createInstance($definition, $name = NULL, TraversableTypedDataInterface $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|null $name: (optional) The name of the

TypedData::applyDefaultValue

public TypedData::applyDefaultValue($notify = TRUE) Applies the default value. Parameters 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. Return value \Drupal\Core\TypedData\TypedDataInterface Returns itself to allow for chaining. Overrides TypedDataInterface::applyDefaultValue File core/lib/Drupal/Core/TypedData/TypedData.php, line 141 Class TypedDat

TypedData::$parent

The parent typed data object. Type: \Drupal\Core\TypedData\TraversableTypedDataInterface|null File core/lib/Drupal/Core/TypedData/TypedData.php, line 40 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code protected $parent;