function auto_entitylabel_entity_update_action in Automatic Entity Label 7
Update action wrapper.
See also
auto_entitylabel_action_info()
1 call to auto_entitylabel_entity_update_action()
- auto_entitylabel_operations_update in ./
auto_entitylabel.module - Callback function for updating node titles.
File
- ./
auto_entitylabel.module, line 368 - Allows hiding of entity label fields and automatic label creation.
Code
function auto_entitylabel_entity_update_action(&$entity, &$context = array()) {
if (auto_entitylabel_is_needed($entity, $context['entity_type'], TRUE)) {
auto_entitylabel_set_title($entity, $context['entity_type']);
// Only save if the title has actually changed.
if (!empty($entity->auto_entitylabel_changed)) {
entity_save($context['entity_type'], $entity);
}
}
}