function lingotek_managed_entity in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.5 lingotek.util.inc \lingotek_managed_entity()
- 7.6 lingotek.util.inc \lingotek_managed_entity()
3 calls to lingotek_managed_entity()
- lingotek_field_language_alter in ./
lingotek.module - Implements hook_field_language_alter().
- lingotek_form_node_form_alter in ./
lingotek.module - Implements hook_form_BASE_FORM_ID_alter().
- lingotek_node_view in ./
lingotek.module - Implements hook_node_view().
File
- ./
lingotek.util.inc, line 2565 - Utility functions.
Code
function lingotek_managed_entity($entity_type, $entity) {
if (isset($entity->lingotek['profile'])) {
if ($entity->lingotek['profile'] == LingotekSync::PROFILE_DISABLED) {
return FALSE;
}
else {
// Profile is present and not set to disabled, so avoid calling
// loadByEntity...
return TRUE;
}
}
$profile = LingotekProfile::loadByEntity($entity_type, $entity);
if ($profile
->getId() == LingotekSync::PROFILE_DISABLED) {
return FALSE;
}
return TRUE;
}