DataDefinition::isRequired

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']);
}
doc_Drupal
2016-10-29 09:00:07
Comments
Leave a Comment

Please login to continue.