protected function LingotekContentModerationHandler::getWorkflowTransition in Lingotek Translation 8.2
Same name and namespace in other branches
- 4.0.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.0.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.1.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.2.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.3.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.4.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.5.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.6.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.7.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
- 3.8.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::getWorkflowTransition()
Get workflow transition helper method.
Needed because of differences in 8.3.x and 8.4.x.
Parameters
\Drupal\workflows\WorkflowInterface $workflow: The workflow.
$transition_id: The transition id.
Return value
\Drupal\workflows\TransitionInterface A transition.
1 call to LingotekContentModerationHandler::getWorkflowTransition()
- LingotekContentModerationHandler::performModerationTransitionIfNeeded in src/
Moderation/ LingotekContentModerationHandler.php - Performs a moderation transition if needed.
File
- src/
Moderation/ LingotekContentModerationHandler.php, line 137
Class
- LingotekContentModerationHandler
- Content moderation handler managing the Lingotek integration.
Namespace
Drupal\lingotek\ModerationCode
protected function getWorkflowTransition(WorkflowInterface $workflow, $transition_id) {
if (floatval(\Drupal::VERSION) >= 8.4) {
return $workflow
->getTypePlugin()
->getTransition($transition_id);
}
else {
return $workflow
->getTransition($transition_id);
}
}