You are here

function realistic_dummy_content_api_validate in Realistic Dummy Content 8.2

Same name and namespace in other branches
  1. 8 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
  2. 7.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
  3. 7 api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()
  4. 3.x api/realistic_dummy_content_api.module \realistic_dummy_content_api_validate()

Throw an exception if an entity is not valid.

2 calls to realistic_dummy_content_api_validate()
Drupal7::genericEntityPresave in api/src/Framework/Drupal7.php
Generic function called by various hooks in Drupal.
Drupal8::hookEntityPresave in api/src/Framework/Drupal8.php

File

api/realistic_dummy_content_api.module, line 282
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.
}