You are here

interface ScheduledTransitionsUtilityInterface in Scheduled Transitions 2.x

Same name and namespace in other branches
  1. 8 src/ScheduledTransitionsUtilityInterface.php \Drupal\scheduled_transitions\ScheduledTransitionsUtilityInterface

Utilities for Scheduled Transitions module.

Hierarchy

Expanded class hierarchy of ScheduledTransitionsUtilityInterface

All classes that implement ScheduledTransitionsUtilityInterface

2 files declare their use of ScheduledTransitionsUtilityInterface
ScheduledTransitionsSettingsForm.php in src/Form/ScheduledTransitionsSettingsForm.php
SupportsContentModerationAccessCheck.php in src/Access/SupportsContentModerationAccessCheck.php

File

src/ScheduledTransitionsUtilityInterface.php, line 14

Namespace

Drupal\scheduled_transitions
View source
interface ScheduledTransitionsUtilityInterface {

  /**
   * Get scheduled transitions for an entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   An entity.
   *
   * @return \Drupal\scheduled_transitions\Entity\ScheduledTransitionInterface[]
   *   An array of scheduled transitions.
   */
  public function getTransitions(EntityInterface $entity) : array;

  /**
   * Get list of entity type/bundles scheduled transitions can work with.
   *
   * @return array
   *   Arrays of bundles keyed by entity type.
   */
  public function getApplicableBundles() : array;

  /**
   * Get list of entity type/bundles scheduled transitions are enabled on.
   *
   * @return array
   *   Arrays of bundles keyed by entity type.
   */
  public function getBundles() : array;

  /**
   * Get potential revisions which can be transitioned to.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity a transition is created for.
   * @param string $language
   *   The language code.
   *
   * @return array
   *   An unordered array of revision IDs.
   */
  public function getTargetRevisionIds(EntityInterface $entity, string $language) : array;

  /**
   * Generates a revision log for a ready to save revision.
   *
   * @param \Drupal\scheduled_transitions\Entity\ScheduledTransitionInterface $scheduledTransition
   *   The scheduled transition for the associated revision.
   * @param \Drupal\Core\Entity\RevisionLogInterface $newRevision
   *   The entity a transition is created for.
   *
   * @return string
   *   A revision log with replaced tokens.
   *
   * @throws \Drupal\scheduled_transitions\Exception\ScheduledTransitionMissingEntity
   *   Thrown if latest revision of a entity could not be determined.
   */
  public function generateRevisionLog(ScheduledTransitionInterface $scheduledTransition, RevisionLogInterface $newRevision) : string;

}

Members

Namesort descending Modifiers Type Description Overrides
ScheduledTransitionsUtilityInterface::generateRevisionLog public function Generates a revision log for a ready to save revision. 1
ScheduledTransitionsUtilityInterface::getApplicableBundles public function Get list of entity type/bundles scheduled transitions can work with. 1
ScheduledTransitionsUtilityInterface::getBundles public function Get list of entity type/bundles scheduled transitions are enabled on. 1
ScheduledTransitionsUtilityInterface::getTargetRevisionIds public function Get potential revisions which can be transitioned to. 1
ScheduledTransitionsUtilityInterface::getTransitions public function Get scheduled transitions for an entity. 1