You are here

public function LingotekWorkbenchModerationHandler::getModerationState in Lingotek Translation 3.1.x

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

Gets the moderation state ID.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity.

Return value

string The moderation state ID.

Overrides LingotekModerationHandlerInterface::getModerationState

2 calls to LingotekWorkbenchModerationHandler::getModerationState()
LingotekWorkbenchModerationHandler::performModerationTransitionIfNeeded in src/Moderation/LingotekWorkbenchModerationHandler.php
Performs a moderation transition if needed.
LingotekWorkbenchModerationHandler::shouldModerationPreventUpload in src/Moderation/LingotekWorkbenchModerationHandler.php
Checks if we should prevent upload based on content moderation settings.

File

src/Moderation/LingotekWorkbenchModerationHandler.php, line 103

Class

LingotekWorkbenchModerationHandler
Workbench moderation handler managing the Lingotek integration.

Namespace

Drupal\lingotek\Moderation

Code

public function getModerationState(ContentEntityInterface $entity) {
  return $entity
    ->get('moderation_state')->target_id;
}