function translation_entity_translate_access

Access callback for the translation overview page.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity whose translation overview should be displayed.

2 calls to translation_entity_translate_access()
comment_links in drupal/core/modules/comment/comment.module
Adds reply, edit, delete, etc. links, depending on user permissions.
TranslationLink::render_link in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php
Alters the field to render a link.
1 string reference to 'translation_entity_translate_access'
translation_entity_entity_info_alter in drupal/core/modules/translation_entity/translation_entity.module
Implements hook_entity_info_alter().

File

drupal/core/modules/translation_entity/translation_entity.module, line 280
Allows entities to be translated into different languages.

Code

function translation_entity_translate_access(EntityInterface $entity) {
  $entity_type = $entity
    ->entityType();
  return empty($entity
    ->language()->locked) && language_multilingual() && $entity
    ->isTranslatable() && (user_access('create entity translations') || user_access('update entity translations') || user_access('delete entity translations'));
}