You are here

function auto_entitylabel_entity_insert in Automatic Entity Label 7

Same name and namespace in other branches
  1. 8.3 auto_entitylabel.module \auto_entitylabel_entity_insert()
  2. 8.2 auto_entitylabel.module \auto_entitylabel_entity_insert()

Implements hook_entity_insert().

1 string reference to 'auto_entitylabel_entity_insert'
auto_entitylabel_exit in ./auto_entitylabel.module
Implements hook_exit().

File

./auto_entitylabel.module, line 159
Allows hiding of entity label fields and automatic label creation.

Code

function auto_entitylabel_entity_insert($entity, $type) {
  if (auto_entitylabel_is_needed($entity, $type, TRUE)) {
    list($id, , ) = entity_extract_ids($type, $entity);
    $entity_list =& drupal_static(__FUNCTION__, array());
    $entity_list[$type][] = $id;
  }
}