function ContentModerationState::updateOrCreateFromEntity
Creates or updates an entity's moderation state whilst saving that entity.
@internal This method should only be called as a result of saving the related content entity.
Parameters
\Drupal\content_moderation\Entity\ContentModerationState $content_moderation_state: The content moderation entity content entity to create or save.
2 calls to ContentModerationState::updateOrCreateFromEntity()
- EntityOperations::entityTranslationDelete in core/
modules/ content_moderation/ src/ EntityOperations.php - EntityOperations::updateOrCreateFromEntity in core/
modules/ content_moderation/ src/ EntityOperations.php - Creates or updates the moderation state of an entity.
File
-
core/
modules/ content_moderation/ src/ Entity/ ContentModerationState.php, line 117
Class
- ContentModerationState
- Defines the Content moderation state entity.
Namespace
Drupal\content_moderation\EntityCode
public static function updateOrCreateFromEntity(ContentModerationState $content_moderation_state) {
$content_moderation_state->realSave();
}