You are here

public function FieldableEdgeEntityBase::validate in Apigee Edge 8

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

src/Entity/FieldableEdgeEntityBase.php, line 362

Class

FieldableEdgeEntityBase
Base field support for Apigee Entities without making them content entities.

Namespace

Drupal\apigee_edge\Entity

Code

public function validate() {
  $this->validated = TRUE;
  $violations = $this
    ->getTypedData()
    ->validate();
  return new EntityConstraintViolationList($this, iterator_to_array($violations));
}