function DataDefinition::getClass
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getClass()
- 10 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getClass()
- 11.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getClass()
Overrides DataDefinitionInterface::getClass
1 method overrides DataDefinition::getClass()
- ListDataDefinition::getClass in core/
lib/ Drupal/ Core/ TypedData/ ListDataDefinition.php - Returns the class used for creating the typed data object.
File
-
core/
lib/ Drupal/ Core/ TypedData/ DataDefinition.php, line 190
Class
- DataDefinition
- A typed data definition class for defining data based on defined data types.
Namespace
Drupal\Core\TypedDataCode
public function getClass() {
if (isset($this->definition['class'])) {
return $this->definition['class'];
}
else {
$type_definition = \Drupal::typedDataManager()->getDefinition($this->getDataType());
return $type_definition['class'];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.