You are here

static function RealisticDummyContent::validate in Realistic Dummy Content 8

Throw an \Exception if an entity is not valid

2 calls to RealisticDummyContent::validate()
RealisticDummyContent::entity_presave in api/src/facade/RealisticDummyContent.php
Implements hook_entity_insert().
realistic_dummy_content_api_validate in api/realistic_dummy_content_api.module
Throw an \Exception if an entity is not valid

File

api/src/facade/RealisticDummyContent.php, line 119
Define autoload class.

Class

RealisticDummyContent

Namespace

Drupal\realistic_dummy_content_api\facade

Code

static function 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.
}