function lingotek_entity_translation_edit_access in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lingotek.module \lingotek_entity_translation_edit_access()
- 7.2 lingotek.module \lingotek_entity_translation_edit_access()
- 7.4 lingotek.module \lingotek_entity_translation_edit_access()
- 7.5 lingotek.module \lingotek_entity_translation_edit_access()
- 7.6 lingotek.module \lingotek_entity_translation_edit_access()
Entity Translation edit access callback when enabled with Lingotek Translation module.
Return value
bool TRUE if the user should be able to access the requested resource, FALSE otherwise.
See also
entity_translation_edit_access()
1 string reference to 'lingotek_entity_translation_edit_access'
- lingotek_menu_alter in ./
lingotek.module - Implements hook_menu_alter().
File
- ./
lingotek.module, line 412
Code
function lingotek_entity_translation_edit_access($entity_type, $entity, $langcode) {
$translations = entity_translation_get_handler($entity_type, $entity)
->getTranslations();
// If a translations for the given language does not exist we cannot edit it.
if (!isset($translations->data[$langcode])) {
return FALSE;
}
// Invoke the actual callback with its arguments.
$args = func_get_args();
return call_user_func_array($args[3], array_slice($args, 4));
}