interface EntityDataDefinitionInterface
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface
- 10 core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface
- 11.x core/lib/Drupal/Core/Entity/TypedData/EntityDataDefinitionInterface.php \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface
Interface for typed data entity definitions.
Hierarchy
- interface \Drupal\Core\TypedData\DataDefinitionInterface
- interface \Drupal\Core\TypedData\ComplexDataDefinitionInterface extends \Drupal\Core\TypedData\DataDefinitionInterface
- interface \Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface extends \Drupal\Core\TypedData\ComplexDataDefinitionInterface
- interface \Drupal\Core\TypedData\ComplexDataDefinitionInterface extends \Drupal\Core\TypedData\DataDefinitionInterface
Expanded class hierarchy of EntityDataDefinitionInterface
All classes that implement EntityDataDefinitionInterface
4 files declare their use of EntityDataDefinitionInterface
- EntityFieldTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityFieldTest.php - EntityTypedDataDefinitionTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityTypedDataDefinitionTest.php - FieldResolver.php in core/
modules/ jsonapi/ src/ Context/ FieldResolver.php - Tables.php in core/
lib/ Drupal/ Core/ Entity/ Query/ Sql/ Tables.php
File
-
core/
lib/ Drupal/ Core/ Entity/ TypedData/ EntityDataDefinitionInterface.php, line 10
Namespace
Drupal\Core\Entity\TypedDataView source
interface EntityDataDefinitionInterface extends ComplexDataDefinitionInterface {
/**
* Gets the entity type ID.
*
* @return string|null
* The entity type ID, or NULL if the entity type is unknown.
*/
public function getEntityTypeId();
/**
* Sets the entity type ID.
*
* @param string $entity_type_id
* The entity type to set.
*
* @return $this
*/
public function setEntityTypeId($entity_type_id);
/**
* Gets the array of possible entity bundles.
*
* @return array|null
* The array of possible bundles, or NULL for any.
*/
public function getBundles();
/**
* Sets the array of possible entity bundles.
*
* @param array|null $bundles
* The array of possible bundles, or NULL for any.
*
* @return $this
*/
public function setBundles(array $bundles = NULL);
}
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 |
EntityDataDefinitionInterface::getBundles | public | function | Gets the array of possible entity bundles. | 1 |
EntityDataDefinitionInterface::getEntityTypeId | public | function | Gets the entity type ID. | 1 |
EntityDataDefinitionInterface::setBundles | public | function | Sets the array of possible entity bundles. | 1 |
EntityDataDefinitionInterface::setEntityTypeId | public | function | Sets the entity type ID. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.