You are here

public function ModerationState::isDefaultRevisionState in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 src/Entity/ModerationState.php \Drupal\workbench_moderation\Entity\ModerationState::isDefaultRevisionState()

Check if revision should be default.

Determines if a revision should be made the default revision upon transition to this state.

Return value

bool TRUE if content in this state should be the default revision.

Overrides ModerationStateInterface::isDefaultRevisionState

File

src/Entity/ModerationState.php, line 83

Class

ModerationState
Defines the Moderation state entity.

Namespace

Drupal\workbench_moderation\Entity

Code

public function isDefaultRevisionState() {
  return $this->published || $this->default_revision;
}