You are here

function tmgmt_local_field_attach_delete in Translation Management Tool 7

Same name and namespace in other branches
  1. 8 translators/tmgmt_local/tmgmt_local.module \tmgmt_local_field_attach_delete()

Implements hook_field_attach_delete().

File

translators/tmgmt_local/tmgmt_local.module, line 697
Main module file for the local translation module.

Code

function tmgmt_local_field_attach_delete($entity_type, $entity) {
  if ($entity_type != 'user' || !array_intersect_key(user_roles(TRUE, 'provide translation services'), $entity->roles)) {
    return;
  }
  tmgmt_local_clear_languages_cache();
}