public ModerationInformation::hasForwardRevision(ContentEntityInterface $entity)
Determines if a forward revision exists for the specified entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity which may or may not have a forward revision.
Return value
bool TRUE if this entity has forward revisions available, FALSE otherwise.
Overrides ModerationInformationInterface::hasForwardRevision
File
- core/modules/content_moderation/src/ModerationInformation.php, line 117
Class
- ModerationInformation
- General service for moderation-related questions about Entity API.
Namespace
Drupal\content_moderation
Code
public function hasForwardRevision(ContentEntityInterface $entity) { return $this->isModeratedEntity($entity) && !($this->getLatestRevisionId($entity->getEntityTypeId(), $entity->id()) == $this->getDefaultRevisionId($entity->getEntityTypeId(), $entity->id())); }
Please login to continue.