public function EntityTranslationDefaultHandler::getSharedFieldsAccess in Entity Translation 7
Overrides EntityTranslationHandlerInterface::getSharedFieldsAccess
See also
EntityTranslationHandlerInterface::getSharedFieldsAccess()
1 call to EntityTranslationDefaultHandler::getSharedFieldsAccess()
- EntityTranslationDefaultHandler::entityFormSharedElements in includes/
translation.handler.inc - Either remove access or add a translatability clue depending on the current user's "edit translation shared fields" permissions.
File
- includes/
translation.handler.inc, line 1193 - Default translation handler for the translation module.
Class
- EntityTranslationDefaultHandler
- Class implementing the default entity translation behaviours.
Code
public function getSharedFieldsAccess() {
$settings = entity_translation_settings($this->entityType, $this->bundle);
return ($settings['shared_fields_original_only'] == FALSE || $this
->getLanguage() == $this
->getActiveLanguage()) && (!entity_translation_workflow_enabled() || user_access('edit translation shared fields') || user_access("edit {$this->entityType} translation shared fields"));
}