function DataDefinition::getConstraints
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getConstraints()
- 10 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getConstraints()
- 11.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::getConstraints()
Overrides DataDefinitionInterface::getConstraints
2 calls to DataDefinition::getConstraints()
- DataDefinition::getConstraint in core/
lib/ Drupal/ Core/ TypedData/ DataDefinition.php - Returns a validation constraint.
- DataReferenceTargetDefinition::getConstraints in core/
lib/ Drupal/ Core/ TypedData/ DataReferenceTargetDefinition.php - Returns an array of validation constraints.
1 method overrides DataDefinition::getConstraints()
- DataReferenceTargetDefinition::getConstraints in core/
lib/ Drupal/ Core/ TypedData/ DataReferenceTargetDefinition.php - Returns an array of validation constraints.
File
-
core/
lib/ Drupal/ Core/ TypedData/ DataDefinition.php, line 261
Class
- DataDefinition
- A typed data definition class for defining data based on defined data types.
Namespace
Drupal\Core\TypedDataCode
public function getConstraints() {
$constraints = isset($this->definition['constraints']) ? $this->definition['constraints'] : [];
$constraints += $this->getTypedDataManager()
->getDefaultConstraints($this);
return $constraints;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.