function EntityContentBase::validateEntity
Same name in other branches
- 9 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::validateEntity()
- 10 core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::validateEntity()
- 11.x core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php \Drupal\migrate\Plugin\migrate\destination\EntityContentBase::validateEntity()
Overrides MigrateValidatableEntityInterface::validateEntity
1 call to EntityContentBase::validateEntity()
- EntityContentBase::import in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ EntityContentBase.php, line 194
Class
- EntityContentBase
- Provides destination class for all content entities lacking a specific class.
Namespace
Drupal\migrate\Plugin\migrate\destinationCode
public function validateEntity(FieldableEntityInterface $entity) {
$violations = $entity->validate();
if (count($violations) > 0) {
throw new EntityValidationException($violations);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.