You are here

public function ContentEntityBase::setValidationRequired in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::setValidationRequired()

Sets whether entity validation is required before saving the entity.

Parameters

bool $required: TRUE if validation is required, FALSE otherwise.

Return value

$this

Overrides FieldableEntityInterface::setValidationRequired

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 503

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function setValidationRequired($required) {
  $this->validationRequired = $required;
  return $this;
}