function realistic_dummy_content_api_is_dummy in Realistic Dummy Content 7
Same name and namespace in other branches
- 8.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_is_dummy()
- 8 api/realistic_dummy_content_api.module \realistic_dummy_content_api_is_dummy()
- 7.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_is_dummy()
- 3.x api/realistic_dummy_content_api.module \realistic_dummy_content_api_is_dummy()
Checks if a given entity is dummy content.
Parameters
$entity: The object for a given entity type, for example this can be a user object or a node object.
$type: The type of the information to change, for example 'user' or 'node'.
Return value
TRUE if at least one module implemented hook_realistic_dummy_content_api_dummy and thinks the entity is a dummy objects; FALSE otherwise.
1 call to realistic_dummy_content_api_is_dummy()
- _realistic_dummy_content_api_entity_presave in api/
realistic_dummy_content_api.module - Generic function called by various hooks in Drupal.
File
- api/
realistic_dummy_content_api.module, line 181 - API code allowing other modules to generate realistic dummy content. See the Realistic Dummy Content module for an example of how to use.
Code
function realistic_dummy_content_api_is_dummy($entity, $type) {
foreach (module_invoke_all('realistic_dummy_content_api_dummy', $entity, $type) as $dummy) {
if ($dummy) {
return TRUE;
}
}
return FALSE;
}