You are here

public function LingotekConfigurationService::getEnabledEntityTypes in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8 src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  2. 8.2 src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  3. 4.0.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  4. 3.0.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  5. 3.1.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  6. 3.3.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  7. 3.4.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  8. 3.5.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  9. 3.6.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  10. 3.7.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()
  11. 3.8.x src/LingotekConfigurationService.php \Drupal\lingotek\LingotekConfigurationService::getEnabledEntityTypes()

Gets the entity types that are enabled for Lingotek content translation.

Return value

\Drupal\Core\Entity\EntityTypeInterface[] An array of entity types that are enabled for Lingotek content translation.

Overrides LingotekConfigurationServiceInterface::getEnabledEntityTypes

File

src/LingotekConfigurationService.php, line 23

Class

LingotekConfigurationService
Service for managing lingotek configuration.

Namespace

Drupal\lingotek

Code

public function getEnabledEntityTypes() {
  $enabled = [];
  foreach (\Drupal::entityTypeManager()
    ->getDefinitions() as $entity_type_id => $entity_type) {
    if ($this
      ->isEnabled($entity_type_id)) {
      $enabled[$entity_type_id] = $entity_type;
    }
  }
  return $enabled;
}