interface FieldItemDataDefinitionInterface
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinitionInterface.php \Drupal\Core\Field\TypedData\FieldItemDataDefinitionInterface
- 10 core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinitionInterface.php \Drupal\Core\Field\TypedData\FieldItemDataDefinitionInterface
- 11.x core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinitionInterface.php \Drupal\Core\Field\TypedData\FieldItemDataDefinitionInterface
Interface for field item data definitions.
Hierarchy
- interface \Drupal\Core\TypedData\DataDefinitionInterface
- interface \Drupal\Core\TypedData\ComplexDataDefinitionInterface extends \Drupal\Core\TypedData\DataDefinitionInterface
- interface \Drupal\Core\Field\TypedData\FieldItemDataDefinitionInterface extends \Drupal\Core\TypedData\ComplexDataDefinitionInterface
- interface \Drupal\Core\TypedData\ComplexDataDefinitionInterface extends \Drupal\Core\TypedData\DataDefinitionInterface
Expanded class hierarchy of FieldItemDataDefinitionInterface
All classes that implement FieldItemDataDefinitionInterface
Related topics
3 files declare their use of FieldItemDataDefinitionInterface
- FieldableEntityNormalizerTrait.php in core/
modules/ serialization/ src/ Normalizer/ FieldableEntityNormalizerTrait.php - FieldItemNormalizer.php in core/
modules/ jsonapi/ src/ Normalizer/ FieldItemNormalizer.php - FieldResolver.php in core/
modules/ jsonapi/ src/ Context/ FieldResolver.php
File
-
core/
lib/ Drupal/ Core/ Field/ TypedData/ FieldItemDataDefinitionInterface.php, line 12
Namespace
Drupal\Core\Field\TypedDataView source
interface FieldItemDataDefinitionInterface extends ComplexDataDefinitionInterface {
/**
* Gets the field item's field definition.
*
* @return \Drupal\Core\Field\FieldDefinitionInterface
* The field definition for this field item.
*/
public function getFieldDefinition();
/**
* Sets the field item's field definition.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The new field definition to assign to this item definition.
*
* @return static
* The object itself for chaining.
*
* @internal
* Should not be used in user code. It allows to overwrite the item
* definition property of the cloned field definition.
*/
public function setFieldDefinition($field_definition);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ComplexDataDefinitionInterface::getMainPropertyName | public | function | Returns the name of the main property, if any. | 2 |
ComplexDataDefinitionInterface::getPropertyDefinition | public | function | Gets the definition of a contained property. | 2 |
ComplexDataDefinitionInterface::getPropertyDefinitions | public | function | Gets an array of property definitions of contained properties. | 2 |
DataDefinitionInterface::addConstraint | public | function | Adds a validation constraint. | 2 |
DataDefinitionInterface::createFromDataType | public static | function | Creates a new data definition object. | 2 |
DataDefinitionInterface::getClass | public | function | Returns the class used for creating the typed data object. | 2 |
DataDefinitionInterface::getConstraint | public | function | Returns a validation constraint. | 2 |
DataDefinitionInterface::getConstraints | public | function | Returns an array of validation constraints. | 2 |
DataDefinitionInterface::getDataType | public | function | Returns the data type of the data. | 2 |
DataDefinitionInterface::getDescription | public | function | Returns a human readable description. | 2 |
DataDefinitionInterface::getLabel | public | function | Returns a human readable label. | 2 |
DataDefinitionInterface::getSetting | public | function | Returns the value of a given setting. | 2 |
DataDefinitionInterface::getSettings | public | function | Returns the array of settings, as required by the used class. | 2 |
DataDefinitionInterface::isComputed | public | function | Determines whether the data value is computed. | 3 |
DataDefinitionInterface::isInternal | public | function | Determines whether the data value is internal. | 2 |
DataDefinitionInterface::isList | public | function | Returns whether the data is multi-valued, i.e. a list of data items. | 2 |
DataDefinitionInterface::isReadOnly | public | function | Determines whether the data is read-only. | 3 |
DataDefinitionInterface::isRequired | public | function | Determines whether a data value is required. | 2 |
FieldItemDataDefinitionInterface::getFieldDefinition | public | function | Gets the field item's field definition. | 1 |
FieldItemDataDefinitionInterface::setFieldDefinition | public | function | Sets the field item's field definition. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.