You are here

public function LingotekConfigTranslationService::isEnabled in Lingotek Translation 8

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

Checks if the given plugin is enabled for Lingotek config translation.

Parameters

string $plugin_id: The config entity plugin id.

Return value

bool TRUE if it enabled, FALSE if not.

Overrides LingotekConfigTranslationServiceInterface::isEnabled

1 call to LingotekConfigTranslationService::isEnabled()
LingotekConfigTranslationService::getEnabledConfigTypes in src/LingotekConfigTranslationService.php
Gets the config entities that are available for Lingotek config translation.

File

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

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function isEnabled($plugin_id) {
  $config = \Drupal::config('lingotek.settings');
  $key = 'translate.config.' . $plugin_id . '.enabled';
  $result = !!$config
    ->get($key);
  return $result;
}