public DataDefinition::setRequired($required)
Sets whether the data is required.
Parameters
bool $required: Whether the data is required.
Return value
static The object itself for chaining.
File
- core/lib/Drupal/Core/TypedData/DataDefinition.php, line 180
Class
- DataDefinition
- A typed data definition class for defining data based on defined data types.
Namespace
Drupal\Core\TypedData
Code
public function setRequired($required) { $this->definition['required'] = $required; return $this; }
Please login to continue.