function forward_entity_insert in Forward 7.3
Implements hook_entity_insert().
1 call to forward_entity_insert()
- forward_install in ./
forward.install - Implements hook_install().
File
- ./
forward.module, line 550 - Allows forwarding of entities by email, and provides a record of how often each has been forwarded.
Code
function forward_entity_insert($entity, $entity_type) {
$info = entity_get_info($entity_type);
if (!empty($info['view modes'])) {
list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
db_insert('forward_statistics')
->fields(array(
'type' => $entity_type,
'bundle' => $bundle,
'id' => $id,
))
->execute();
}
}