ContentTranslationManager::isSupported

public ContentTranslationManager::isSupported($entity_type_id)

Checks whether an entity type supports translation.

Parameters

string $entity_type_id: The entity type.

Return value

bool TRUE if an entity type is supported, FALSE otherwise.

Overrides ContentTranslationManagerInterface::isSupported

File

core/modules/content_translation/src/ContentTranslationManager.php, line 60

Class

ContentTranslationManager
Provides common functionality for content translation.

Namespace

Drupal\content_translation

Code

public function isSupported($entity_type_id) {
  $entity_type = $this->entityManager->getDefinition($entity_type_id);
  return $entity_type->isTranslatable() && ($entity_type->hasLinkTemplate('drupal:content-translation-overview') || $entity_type->get('content_translation_ui_skip'));
}
doc_Drupal
2016-10-29 08:58:20
Comments
Leave a Comment

Please login to continue.