function ContentTranslationManager::getSupportedEntityTypes

Same name in other branches
  1. 9 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::getSupportedEntityTypes()
  2. 8.9.x core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::getSupportedEntityTypes()
  3. 10 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::getSupportedEntityTypes()

File

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

Class

ContentTranslationManager
Provides common functionality for content translation.

Namespace

Drupal\content_translation

Code

public function getSupportedEntityTypes() {
    $supported_types = [];
    foreach ($this->entityTypeManager
        ->getDefinitions() as $entity_type_id => $entity_type) {
        if ($this->isSupported($entity_type_id)) {
            $supported_types[$entity_type_id] = $entity_type;
        }
    }
    return $supported_types;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.