function DataDefinition::isRequired
Same name in other branches
- 8.9.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::isRequired()
- 10 core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::isRequired()
- 11.x core/lib/Drupal/Core/TypedData/DataDefinition.php \Drupal\Core\TypedData\DataDefinition::isRequired()
Overrides DataDefinitionInterface::isRequired
1 call to DataDefinition::isRequired()
- BaseFieldDefinition::isStorageRequired in core/
lib/ Drupal/ Core/ Field/ BaseFieldDefinition.php - Returns whether the field storage is required.
File
-
core/
lib/ Drupal/ Core/ TypedData/ DataDefinition.php, line 169
Class
- DataDefinition
- A typed data definition class for defining data based on defined data types.
Namespace
Drupal\Core\TypedDataCode
public function isRequired() {
return !empty($this->definition['required']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.