function TypedData::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/TypedData.php \Drupal\Core\TypedData\TypedData::__construct()
- 8.9.x core/lib/Drupal/Core/TypedData/TypedData.php \Drupal\Core\TypedData\TypedData::__construct()
- 10 core/lib/Drupal/Core/TypedData/TypedData.php \Drupal\Core\TypedData\TypedData::__construct()
Constructs a TypedData object given its definition and context.
Parameters
\Drupal\Core\TypedData\DataDefinitionInterface $definition: The data definition.
string $name: (optional) The name of the created property, or NULL if it is the root of a typed data tree. Defaults to NULL.
\Drupal\Core\TypedData\TypedDataInterface $parent: (optional) The parent object of the data property, or NULL if it is the root of a typed data tree. Defaults to NULL.
See also
\Drupal\Core\TypedData\TypedDataManager::create()
4 calls to TypedData::__construct()
- DateTimeComputed::__construct in core/
modules/ datetime/ src/ DateTimeComputed.php - Constructs a TypedData object given its definition and context.
- FieldItemBase::__construct in core/
lib/ Drupal/ Core/ Field/ FieldItemBase.php - Constructs a TypedData object given its definition and context.
- Mapping::__construct in core/
lib/ Drupal/ Core/ Config/ Schema/ Mapping.php - Constructs a TypedData object given its definition and context.
- TextProcessed::__construct in core/
modules/ text/ src/ TextProcessed.php - Constructs a TypedData object given its definition and context.
4 methods override TypedData::__construct()
- DateTimeComputed::__construct in core/
modules/ datetime/ src/ DateTimeComputed.php - Constructs a TypedData object given its definition and context.
- FieldItemBase::__construct in core/
lib/ Drupal/ Core/ Field/ FieldItemBase.php - Constructs a TypedData object given its definition and context.
- Mapping::__construct in core/
lib/ Drupal/ Core/ Config/ Schema/ Mapping.php - Constructs a TypedData object given its definition and context.
- TextProcessed::__construct in core/
modules/ text/ src/ TextProcessed.php - Constructs a TypedData object given its definition and context.
File
-
core/
lib/ Drupal/ Core/ TypedData/ TypedData.php, line 64
Class
- TypedData
- The abstract base class for typed data.
Namespace
Drupal\Core\TypedDataCode
public function __construct(DataDefinitionInterface $definition, $name = NULL, ?TypedDataInterface $parent = NULL) {
$this->definition = $definition;
$this->parent = $parent;
$this->name = $name;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.