You are here

function auto_entitylabel_entity_presave in Automatic Entity Label 7

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

Implements hook_entity_presave().

1 call to auto_entitylabel_entity_presave()
auto_entitylabel_field_attach_presave in ./auto_entitylabel.module
Implements hook_field_attach_presave().

File

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

Code

function auto_entitylabel_entity_presave($entity, $type) {
  if (auto_entitylabel_is_needed($entity, $type)) {
    auto_entitylabel_set_title($entity, $type);
  }
}