public function CropType::validate in Crop API 8.2
Same name and namespace in other branches
- 8 src/Entity/CropType.php \Drupal\crop\Entity\CropType::validate()
Validates the currently set values.
Return value
\Symfony\Component\Validator\ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.
Overrides CropTypeInterface::validate
File
- src/
Entity/ CropType.php, line 125
Class
- CropType
- Defines the Crop type configuration entity.
Namespace
Drupal\crop\EntityCode
public function validate() {
$violations = $this
->getTypedData()
->validate();
return new ConstraintViolationList(iterator_to_array($violations));
}