X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fsrc%2FModerationInformationInterface.php;fp=web%2Fcore%2Fmodules%2Fcontent_moderation%2Fsrc%2FModerationInformationInterface.php;h=1dafb3f71c5d65edd5dc9917ec3ef493764e1958;hp=862987f8d8c5c3c89621bc1fef5aeed182b9f3eb;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/content_moderation/src/ModerationInformationInterface.php b/web/core/modules/content_moderation/src/ModerationInformationInterface.php index 862987f8d..1dafb3f71 100644 --- a/web/core/modules/content_moderation/src/ModerationInformationInterface.php +++ b/web/core/modules/content_moderation/src/ModerationInformationInterface.php @@ -89,6 +89,30 @@ interface ModerationInformationInterface { */ public function getDefaultRevisionId($entity_type_id, $entity_id); + /** + * Returns the revision translation affected translation of a revision. + * + * @param \Drupal\Core\Entity\ContentEntityInterface $entity + * The content entity. + * + * @return \Drupal\Core\Entity\ContentEntityInterface + * The revision translation affected translation. + */ + public function getAffectedRevisionTranslation(ContentEntityInterface $entity); + + /** + * Determines if pending revisions are allowed. + * + * @internal + * + * @param \Drupal\Core\Entity\ContentEntityInterface $entity + * The content entity. + * + * @return bool + * If pending revisions are allowed. + */ + public function isPendingRevisionAllowed(ContentEntityInterface $entity); + /** * Determines if an entity is a latest revision. * @@ -102,15 +126,15 @@ interface ModerationInformationInterface { public function isLatestRevision(ContentEntityInterface $entity); /** - * Determines if a forward revision exists for the specified entity. + * Determines if a pending revision exists for the specified entity. * * @param \Drupal\Core\Entity\ContentEntityInterface $entity - * The entity which may or may not have a forward revision. + * The entity which may or may not have a pending revision. * * @return bool - * TRUE if this entity has forward revisions available, FALSE otherwise. + * TRUE if this entity has pending revisions available, FALSE otherwise. */ - public function hasForwardRevision(ContentEntityInterface $entity); + public function hasPendingRevision(ContentEntityInterface $entity); /** * Determines if an entity is "live". @@ -126,6 +150,21 @@ interface ModerationInformationInterface { */ public function isLiveRevision(ContentEntityInterface $entity); + /** + * Determines if the default revision for the given entity is published. + * + * The default revision is the same as the entity retrieved by "default" from + * the storage handler. If the entity is translated, check if any of the + * translations are published. + * + * @param \Drupal\Core\Entity\ContentEntityInterface $entity + * The entity being saved. + * + * @return bool + * TRUE if the default revision is published. FALSE otherwise. + */ + public function isDefaultRevisionPublished(ContentEntityInterface $entity); + /** * Gets the workflow for the given content entity. *