TypedDataInterface::setContext

public TypedDataInterface::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 prop

TypedDataInterface::setValue

public TypedDataInterface::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

TypedDataInterface::validate

public TypedDataInterface::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. File core/lib/Drupal/Core/TypedData/TypedDataInterface.php, line 90 Class TypedDataInterface Interface for typed data objects. Namespace Drupal\Core\TypedData Code public function validate();

TypedDataManager

Manages data type plugins. Hierarchy class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTraitclass \Drupal\Core\Plugin\DefaultPluginManager implements CachedDiscoveryInterface, PluginManagerInterface, CacheableDependencyInterface uses DiscoveryCachedTrait, UseCacheBackendTraitclass \Drupal\Core\TypedData\TypedDataManager implements TypedDataManagerInterface uses DependencySerializationTrait File core/lib/Drupal/Core/TypedData/TypedDataManager.p

TypedDataManager::$classResolver

The class resolver. Type: \Drupal\Core\DependencyInjection\ClassResolverInterface File core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 50 Class TypedDataManager Manages data type plugins. Namespace Drupal\Core\TypedData Code protected $classResolver;

TypedDataManager::$constraintManager

The validation constraint manager to use for instantiating constraints. Type: \Drupal\Core\Validation\ConstraintManager File core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 36 Class TypedDataManager Manages data type plugins. Namespace Drupal\Core\TypedData Code protected $constraintManager;

TypedDataManager::$prototypes

An array of typed data property prototypes. Type: array File core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 43 Class TypedDataManager Manages data type plugins. Namespace Drupal\Core\TypedData Code protected $prototypes = array();

TypedDataManager::$validator

The validator used for validating typed data. Type: \Symfony\Component\Validator\Validator\ValidatorInterface File core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 29 Class TypedDataManager Manages data type plugins. Namespace Drupal\Core\TypedData Code protected $validator;

TypedDataManager::clearCachedDefinitions

public TypedDataManager::clearCachedDefinitions() Clears static and persistent plugin definition caches. Don't resort to calling \Drupal::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager! Overrides DefaultPluginManager::clearCachedDefinitions File core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 267 Class TypedDataManager Manages data type plugins. Namespace Drupal\Co

TypedDataManager::create

public TypedDataManager::create(DataDefinitionInterface $definition, $value = NULL, $name = NULL, $parent = NULL) Creates a new typed data object instance. Parameters \Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition of the typed data object. For backwards-compatibility an array representation of the data definition may be passed also. mixed $value: (optional) The data value. If set, it has to match one of the supported data type format as documented for the data