function lingotek_entity_update in Lingotek Translation 7.7
Same name and namespace in other branches
- 8 lingotek.module \lingotek_entity_update()
- 8.2 lingotek.module \lingotek_entity_update()
- 7.5 lingotek.module \lingotek_entity_update()
- 7.6 lingotek.module \lingotek_entity_update()
- 4.0.x lingotek.module \lingotek_entity_update()
- 3.0.x lingotek.module \lingotek_entity_update()
- 3.1.x lingotek.module \lingotek_entity_update()
- 3.2.x lingotek.module \lingotek_entity_update()
- 3.3.x lingotek.module \lingotek_entity_update()
- 3.4.x lingotek.module \lingotek_entity_update()
- 3.5.x lingotek.module \lingotek_entity_update()
- 3.6.x lingotek.module \lingotek_entity_update()
- 3.7.x lingotek.module \lingotek_entity_update()
- 3.8.x lingotek.module \lingotek_entity_update()
Implements hook_entity_update().
1 call to lingotek_entity_update()
- lingotek_entity_insert in ./
lingotek.module - Implements hook_entity_insert().
File
- ./
lingotek.module, line 1631
Code
function lingotek_entity_update($entity, $entity_type) {
_lingotek_update_bean_source_language($entity, $entity_type);
$managed_entity_types = array_keys(lingotek_managed_entity_types());
if (!in_array($entity_type, $managed_entity_types)) {
// nothing to do here
return;
}
if ($entity_type == 'node' && !empty($entity->tnid) && $entity->nid != $entity->tnid) {
//check to make sure it is not a target node
return;
}
lingotek_entity_save($entity, $entity_type);
}