You are here

public function LingotekConfigTranslationService::getEnabledConfigTypes in Lingotek Translation 8

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

Gets the config entities that are available for Lingotek config translation.

Return value

\Drupal\Core\Entity\EntityTypeInterface[] An array of config entities that are enabled for Lingotek config translation.

Overrides LingotekConfigTranslationServiceInterface::getEnabledConfigTypes

File

src/LingotekConfigTranslationService.php, line 97
Contains \Drupal\lingotek\LingotekConfigTranslationService.

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function getEnabledConfigTypes() {
  $enabled_types = [];
  foreach ($this->mappers as $mapper) {
    if ($mapper instanceof ConfigEntityMapper) {
      $enabled = $this
        ->isEnabled($mapper
        ->getPluginId());
      if ($enabled) {
        $enabled_types[] = $mapper
          ->getPluginId();
      }
    }
  }
  return $enabled_types;
}