ModerationState

Defines the Moderation state entity. Plugin annotation @ConfigEntityType( id = "moderation_state", label = @Translation("Moderation state"), handlers = { "access" = "Drupal\content_moderation\ModerationStateAccessControlHandler", "list_builder" = "Drupal\content_moderation\ModerationStateListBuilder", "form" = { "add" = "Drupal\content_moderation\Form\ModerationStateForm", "edit" = "Drupal\content_moderation\Form\ModerationStateForm", "delete" = "Drupal\conte

ModerationInformationInterface::shouldModerateEntitiesOfBundle

public ModerationInformationInterface::shouldModerateEntitiesOfBundle(EntityTypeInterface $entity_type, $bundle) Determines if an entity type/bundle entities should be moderated. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition to check. string $bundle: The bundle to check. Return value bool TRUE if an entity type/bundle entities should be moderated, FALSE otherwise. File core/modules/content_moderation/src/ModerationInformationInterface.php, line 48

ModerationInformationInterface::isModeratedEntity

public ModerationInformationInterface::isModeratedEntity(EntityInterface $entity) Determines if an entity is moderated. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity we may be moderating. Return value bool TRUE if this entity is moderated, FALSE otherwise. File core/modules/content_moderation/src/ModerationInformationInterface.php, line 23 Class ModerationInformationInterface Interface for moderation_information service. Namespace Drupal\content_moderation Code p

ModerationInformationInterface::isLiveRevision

public ModerationInformationInterface::isLiveRevision(ContentEntityInterface $entity) Determines if an entity is "live". A "live" entity revision is one whose latest revision is also the default, and whose moderation state, if any, is a published state. Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: The entity to check. Return value bool TRUE if the specified entity is a live revision, FALSE otherwise. File core/modules/content_moderation/src/ModerationInformationInterface.php

ModerationInformationInterface::hasForwardRevision

public ModerationInformationInterface::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. File core/modules/content_moderation/src/ModerationInformationInterface.php, line 113 Class ModerationInformationInterface Inter

ModerationInformationInterface::getDefaultRevisionId

public ModerationInformationInterface::getDefaultRevisionId($entity_type_id, $entity_id) Returns the revision ID of the default revision for the specified entity. Parameters string $entity_type_id: The entity type ID. int $entity_id: The entity ID. Return value int The revision ID of the default revision, or NULL if the entity was not found. File core/modules/content_moderation/src/ModerationInformationInterface.php, line 90 Class ModerationInformationInterface Interface for moderation_i

ModerationInformationInterface::canModerateEntitiesOfEntityType

public ModerationInformationInterface::canModerateEntitiesOfEntityType(EntityTypeInterface $entity_type) Determines if an entity type can have moderated entities. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: An entity type object. Return value bool TRUE if this entity type can have moderated entities, FALSE otherwise. File core/modules/content_moderation/src/ModerationInformationInterface.php, line 34 Class ModerationInformationInterface Interface for moderation_infor

ModerationInformationInterface

Interface for moderation_information service. Hierarchy interface \Drupal\content_moderation\ModerationInformationInterface File core/modules/content_moderation/src/ModerationInformationInterface.php, line 12 Namespace Drupal\content_moderation Members Name Modifiers Type Description ModerationInformationInterface::canModerateEntitiesOfEntityType public function Determines if an entity type can have moderated entities. ModerationInformationInterface::getDefaultRevision

ModerationInformation::__construct

public ModerationInformation::__construct(EntityTypeManagerInterface $entity_type_manager) Creates a new ModerationInformation instance. Parameters \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager. \Drupal\Core\Session\AccountInterface $current_user: The current user. File core/modules/content_moderation/src/ModerationInformation.php, line 30 Class ModerationInformation General service for moderation-related questions about Entity API. Namespa

ModerationInformation::shouldModerateEntitiesOfBundle

public ModerationInformation::shouldModerateEntitiesOfBundle(EntityTypeInterface $entity_type, $bundle) Determines if an entity type/bundle entities should be moderated. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition to check. string $bundle: The bundle to check. Return value bool TRUE if an entity type/bundle entities should be moderated, FALSE otherwise. Overrides ModerationInformationInterface::shouldModerateEntitiesOfBundle File core/modules/co