You are here

interface LingotekModerationHandlerInterface in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 8.2 src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  2. 3.0.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  3. 3.1.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  4. 3.2.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  5. 3.3.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  6. 3.4.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  7. 3.5.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  8. 3.6.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  9. 3.7.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface
  10. 3.8.x src/Moderation/LingotekModerationHandlerInterface.php \Drupal\lingotek\Moderation\LingotekModerationHandlerInterface

Moderation handler managing the Lingotek integration.

@package Drupal\lingotek\Moderation

Hierarchy

Expanded class hierarchy of LingotekModerationHandlerInterface

All classes that implement LingotekModerationHandlerInterface

1 file declares its use of LingotekModerationHandlerInterface
LingotekModerationFactoryTest.php in tests/src/Unit/Moderation/LingotekModerationFactoryTest.php

File

src/Moderation/LingotekModerationHandlerInterface.php, line 13

Namespace

Drupal\lingotek\Moderation
View source
interface LingotekModerationHandlerInterface extends LingotekModerationServiceInterface {

  /**
   * Checks if we should prevent upload based on content moderation settings.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The content entity.
   *
   * @return bool
   *   Returns TRUE if we should prevent the upload based on content moderation.
   */
  public function shouldModerationPreventUpload(EntityInterface $entity);

  /**
   * Performs a moderation transition if needed.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The content entity.
   */
  public function performModerationTransitionIfNeeded(ContentEntityInterface &$entity);

  /**
   * Gets the moderation state ID.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The content entity.
   *
   * @return string
   *   The moderation state ID.
   */
  public function getModerationState(ContentEntityInterface $entity);

  /**
   * Sets the moderation state ID.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The content entity.
   * @param string $state
   *   The moderation state ID.
   */
  public function setModerationState(ContentEntityInterface $entity, $state);

  /**
   * Checks if the moderation is enabled for this entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The content entity.
   *
   * @return bool
   *   If moderation is enabled, returns TRUE. Returns FALSE otherwise.
   */
  public function isModerationEnabled(EntityInterface $entity);

}

Members

Namesort descending Modifiers Type Description Overrides
LingotekModerationHandlerInterface::getModerationState public function Gets the moderation state ID. 3
LingotekModerationHandlerInterface::isModerationEnabled public function Checks if the moderation is enabled for this entity. 3
LingotekModerationHandlerInterface::performModerationTransitionIfNeeded public function Performs a moderation transition if needed. 3
LingotekModerationHandlerInterface::setModerationState public function Sets the moderation state ID. 3
LingotekModerationHandlerInterface::shouldModerationPreventUpload public function Checks if we should prevent upload based on content moderation settings. 3
LingotekModerationServiceInterface::applies public function Checks if this service applies.
LingotekModerationServiceInterface::setModuleHandler public function Sets the module handler for this service.