interface DataDefinitionInterface
Interface for data definitions.
Data definitions are used to describe data based upon available data types. For example, a plugin could describe its parameters using data definitions in order to specify what kind of data is required for it.
Definitions that describe lists or complex data have to implement the respective interfaces, such that the metadata about contained list items or properties can be retrieved from the definition.
Hierarchy
- interface \Drupal\Core\TypedData\DataDefinitionInterface
See also
\Drupal\Core\TypedData\DataDefinition
\Drupal\Core\TypedData\ListDefinitionInterface
\Drupal\Core\TypedData\ComplexDataDefinitionInterface
\Drupal\Core\TypedData\DataReferenceDefinitionInterface
\Drupal\Core\TypedData\TypedDataInterface
Related topics
- Typed Data API
- API for describing data based on a set of available data types.
File
- core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php, line 24
Namespace
Drupal\Core\TypedDataMembers
Name | Modifiers | Type | Description |
---|---|---|---|
DataDefinitionInterface::addConstraint | public | function | Adds a validation constraint. |
DataDefinitionInterface::createFromDataType | public static | function | Creates a new data definition object. |
DataDefinitionInterface::getClass | public | function | Returns the class used for creating the typed data object. |
DataDefinitionInterface::getConstraint | public | function | Returns a validation constraint. |
DataDefinitionInterface::getConstraints | public | function | Returns an array of validation constraints. |
DataDefinitionInterface::getDataType | public | function | Returns the data type of the data. |
DataDefinitionInterface::getDescription | public | function | Returns a human readable description. |
DataDefinitionInterface::getLabel | public | function | Returns a human readable label. |
DataDefinitionInterface::getSetting | public | function | Returns the value of a given setting. |
DataDefinitionInterface::getSettings | public | function | Returns the array of settings, as required by the used class. |
DataDefinitionInterface::isComputed | public | function | Determines whether the data value is computed. |
DataDefinitionInterface::isList | public | function | Returns whether the data is multi-valued, i.e. a list of data items. |
DataDefinitionInterface::isReadOnly | public | function | Determines whether the data is read-only. |
DataDefinitionInterface::isRequired | public | function | Determines whether a data value is required. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!DataDefinitionInterface.php/interface/DataDefinitionInterface/8.1.x