public function LingotekContentModerationHandler::setModerationState in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8.2 src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 4.0.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.0.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.1.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.2.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.3.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.4.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.5.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.7.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
- 3.8.x src/Moderation/LingotekContentModerationHandler.php \Drupal\lingotek\Moderation\LingotekContentModerationHandler::setModerationState()
Sets the moderation state ID.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity.
string $state: The moderation state ID.
Overrides LingotekModerationHandlerInterface::setModerationState
1 call to LingotekContentModerationHandler::setModerationState()
- LingotekContentModerationHandler::performModerationTransitionIfNeeded in src/
Moderation/ LingotekContentModerationHandler.php - Performs a moderation transition if needed.
File
- src/
Moderation/ LingotekContentModerationHandler.php, line 165
Class
- LingotekContentModerationHandler
- Content moderation handler managing the Lingotek integration.
Namespace
Drupal\lingotek\ModerationCode
public function setModerationState(ContentEntityInterface $entity, $state) {
$entity
->set('moderation_state', $state);
}