ContentModerationState::updateOrCreateFromEntity

public static ContentModerationState::updateOrCreateFromEntity(ContentModerationState $content_moderation_state)

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.

File

core/modules/content_moderation/src/Entity/ContentModerationState.php, line 132

Class

ContentModerationState
Defines the Content moderation state entity.

Namespace

Drupal\content_moderation\Entity

Code

public static function updateOrCreateFromEntity(ContentModerationState $content_moderation_state) {
  $content_moderation_state->realSave();
}
doc_Drupal
2016-10-29 08:58:03
Comments
Leave a Comment

Please login to continue.