public function ContentEntityBase::validate in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::validate()
Validates the currently set values.
Return value
\Drupal\Core\Entity\EntityConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.
Overrides FieldableEntityInterface::validate
File
- core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php, line 374 - Contains \Drupal\Core\Entity\ContentEntityBase.
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\EntityCode
public function validate() {
$this->validated = TRUE;
$violations = $this
->getTypedData()
->validate();
return new EntityConstraintViolationList($this, iterator_to_array($violations));
}