TypedDataInterface::getConstraints

public TypedDataInterface::getConstraints() Gets a list of validation constraints. Return value array Array of constraints, each being an instance of \Symfony\Component\Validator\Constraint. File core/lib/Drupal/Core/TypedData/TypedDataInterface.php, line 81 Class TypedDataInterface Interface for typed data objects. Namespace Drupal\Core\TypedData Code public function getConstraints();

TypedDataInterface::getName

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

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

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

TypedDataInterface::applyDefaultValue

public TypedDataInterface::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. File core/lib/Drupal/Core/TypedData/TypedDataInterface.php, line 103 Class TypedDataInterface Interface for type

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

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::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::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(); }