public function ContentTranslationManager::getSupportedEntityTypes in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\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 70
Class
- ContentTranslationManager
- Provides common functionality for content translation.
Namespace
Drupal\content_translationCode
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;
}