You are here

public function LingotekModerationFactory::getModerationConfigurationService in Lingotek Translation 4.0.x

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

Gets the first moderation configuration service applying to a given entity.

Return value

\Drupal\lingotek\Moderation\LingotekModerationConfigurationServiceInterface The moderation configuration service.

Overrides LingotekModerationFactoryInterface::getModerationConfigurationService

File

src/Moderation/LingotekModerationFactory.php, line 69

Class

LingotekModerationFactory
A facade for getting the services that are part of moderation integrations.

Namespace

Drupal\lingotek\Moderation

Code

public function getModerationConfigurationService() {
  foreach ($this->config as $service) {
    if ($service
      ->applies()) {
      return $service;
    }
  }
}