function realistic_dummy_content_api_validate in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
- 8 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
- 7.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
- 7 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
Throw an exception if an entity is not valid.
1 call to realistic_dummy_content_api_validate()
- Drupal8::hookEntityPresave in api/
src/ Framework/ Drupal8.php - React to an entity just before it is saved.
File
- api/
realistic_dummy_content_api.module, line 229 - API code allowing other modules to generate realistic dummy content.
Code
function realistic_dummy_content_api_validate($entity, $type) {
// Throw an exception here if an entity is not valid, for example if two users
// have the same email address or name, or anything else.
// @TODO provide a hook for third-party modules to manage this.
}