function ModerationHandlerInterface::onPresave

Same name in other branches
  1. 8.9.x core/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php \Drupal\content_moderation\Entity\Handler\ModerationHandlerInterface::onPresave()
  2. 10 core/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php \Drupal\content_moderation\Entity\Handler\ModerationHandlerInterface::onPresave()
  3. 11.x core/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php \Drupal\content_moderation\Entity\Handler\ModerationHandlerInterface::onPresave()

Operates on moderated content entities preSave().

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity to modify.

bool $default_revision: Whether the new revision should be made the default revision.

bool $published_state: Whether the state being transitioned to is a published state or not.

1 method overrides ModerationHandlerInterface::onPresave()
ModerationHandler::onPresave in core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php
Operates on moderated content entities preSave().

File

core/modules/content_moderation/src/Entity/Handler/ModerationHandlerInterface.php, line 52

Class

ModerationHandlerInterface
Defines operations that need to vary by entity type.

Namespace

Drupal\content_moderation\Entity\Handler

Code

public function onPresave(ContentEntityInterface $entity, $default_revision, $published_state);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.