ContentTranslationManager::getSupportedEntityTypes

public ContentTranslationManager::getSupportedEntityTypes()

Gets the entity types that support content translation.

Return value

\Drupal\Core\Entity\EntityTypeInterface[] An array of entity types that support content translation.

Overrides ContentTranslationManagerInterface::getSupportedEntityTypes

File

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

Class

ContentTranslationManager
Provides common functionality for content translation.

Namespace

Drupal\content_translation

Code

public function getSupportedEntityTypes() {
  $supported_types = array();
  foreach ($this->entityManager->getDefinitions() as $entity_type_id => $entity_type) {
    if ($this->isSupported($entity_type_id)) {
      $supported_types[$entity_type_id] = $entity_type;
    }
  }
  return $supported_types;
}
doc_Drupal
2016-10-29 08:58:19
Comments
Leave a Comment

Please login to continue.