You are here

trait LingotekWorkbenchModerationCheckTrait in Lingotek Translation 4.0.x

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

Utility methods for all the 'workbench_moderation' moderation services.

@package Drupal\lingotek\Moderation

Hierarchy

File

src/Moderation/LingotekWorkbenchModerationCheckTrait.php, line 12

Namespace

Drupal\lingotek\Moderation
View source
trait LingotekWorkbenchModerationCheckTrait {

  /**
   * The module handler service.
   *
   * @var \Drupal\Core\Extension\ModuleHandlerInterface
   */
  protected $moduleHandler;

  /**
   * {@inheritdoc}
   */
  public function applies() {
    return $this->moduleHandler
      ->moduleExists('workbench_moderation');
  }

  /**
   * {@inheritdoc}
   */
  public function setModuleHandler(ModuleHandlerInterface $module_handler) {
    $this->moduleHandler = $module_handler;
    return $this;
  }

}

Members