public DataDefinition::isRequired()
Determines whether a data value is required.
For required data a non-NULL value is mandatory.
Return value
bool Whether a data value is required.
Overrides DataDefinitionInterface::isRequired
File
- core/lib/Drupal/Core/TypedData/DataDefinition.php, line 167
Class
- DataDefinition
- A typed data definition class for defining data based on defined data types.
Namespace
Drupal\Core\TypedData
Code
public function isRequired() { return !empty($this->definition['required']); }
Please login to continue.