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::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::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::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::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::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::$name

The property name. Type: string File core/lib/Drupal/Core/TypedData/TypedData.php, line 33 Class TypedData The abstract base class for typed data. Namespace Drupal\Core\TypedData Code protected $name;

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::$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;