You are here

interface ConfigEntityRevisionsRevisionStorageHandlerInterface in Config Entity Revisions 8.2

Interface ConfigEntityRevisionsRevisionStorageHandlerInterface.

@package Drupal\config_entity_revisions

Hierarchy

Expanded class hierarchy of ConfigEntityRevisionsRevisionStorageHandlerInterface

All classes that implement ConfigEntityRevisionsRevisionStorageHandlerInterface

1 file declares its use of ConfigEntityRevisionsRevisionStorageHandlerInterface
ConfigEntityRevisionsRevisionStorageHandler.php in src/Entity/Handler/ConfigEntityRevisionsRevisionStorageHandler.php

File

src/ConfigEntityRevisionsRevisionStorageHandlerInterface.php, line 14

Namespace

Drupal\config_entity_revisions
View source
interface ConfigEntityRevisionsRevisionStorageHandlerInterface extends ContentEntityStorageInterface {

  /**
   * Set the config entity under consideration.
   *
   * @param \Drupal\config_entity_revisions\ConfigEntityRevisionsConfigEntityInterface $config_entity
   *   The config_entity_revisions entity.
   */
  public function setConfigEntity(ConfigEntityRevisionsConfigEntityInterface $config_entity);

  /**
   * Gets the latest published revision ID of the entity.
   *
   * @param int $ignore
   *   A revision ID to ignore.
   *
   * @return int
   *   The identifier of the latest published revision of the entity, or NULL
   *   if the entity does not have a published revision.
   */
  public function getLatestPublishedRevisionId($ignore = NULL);

  /**
   * Gets the latest published revision of the entity.
   *
   * @return RevisionableStorageInterface
   *   The identifier of the latest published revision of the entity, or NULL
   *   if the entity does not have a published revision.
   */
  public function getLatestPublishedRevision();

  /**
   * Gets the latest revision ID of the entity.
   *
   * @param int $ignore
   *   A revision ID to ignore.
   *
   * @return int
   *   The identifier of the latest published revision of the entity, or NULL
   *   if the entity does not have a published revision.
   */
  public function getLatestRevisionId($ignore = NULL);

  /**
   * Gets the latest revision of the entity.
   *
   * @param int $ignore
   *   A revision ID to ignore.
   *
   * @return int
   *   The identifier of the latest published revision of the entity, or NULL
   *   if the entity does not have a published revision.
   */
  public function getLatestRevision($ignore = NULL);

  /**
   * Gets the latest revision ID of the entity.
   *
   * @param int $ignore
   *   A revision ID to ignore.
   *
   * @return int
   *   The identifier of the latest published revision of the entity, or NULL
   *   if the entity does not have a published revision.
   */
  public function getLatestPublishedRevisionOrLatestId($ignore = NULL);

  /**
   * Get a Config Entity instance from Content Entity Revision.
   *
   * @param \Drupal\config_entity_revisions\Entity\ConfigEntityRevisions $content_entity
   *   The ConfigEntityRevisions entity instance.
   *
   * @return \Drupal\config_entity_revisions\Entity\ConfigEntityRevisions
   *   The deserialised config entity.
   */
  public function getConfigEntity(ConfigEntityRevisions $content_entity);

  /**
   * Create an initial revision record.
   *
   * @param \Drupal\config_entity_revisions\ConfigEntityRevisionsConfigEntityInterface $config_entity
   *   The configuration entity.
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface|null
   *   The content entity created.
   *
   * @throws \Drupal\Core\Entity\EntityStorageException
   */
  public function createInitialRevision(ConfigEntityRevisionsConfigEntityInterface $config_entity);

  /**
   * Create revision when a new config entity version is saved.
   *
   * @param \Drupal\config_entity_revisions\ConfigEntityRevisionsConfigEntityInterface $config_entity
   *   The configuration entity.
   *
   * @throws \Drupal\Core\Entity\EntityStorageException
   */
  public function createUpdateRevision(ConfigEntityRevisionsConfigEntityInterface $config_entity);

  /**
   * Make default the most recently published or the most recent revision.
   *
   * This is needed because content_moderation has a concept of a default
   * revision, which this module doesn't really care about, but which will
   * cause problems if we attempt to delete a revision that's marked as the
   * default.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $content_entity
   *   The content (revisions) entity.
   */
  public function resetDefaultRevision(ContentEntityInterface $content_entity);

  /**
   * Get a list of revision IDs for a content entity.
   */
  public function getRevisionIds($content_entity_id);

  /**
   * Delete a single revision.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $revision
   *   The revision to be deleted.
   */
  public function deleteSingleRevision(ContentEntityInterface $revision);

  /**
   * Delete revisions when a config entity is deleted.
   *
   * @param \Drupal\config_entity_revisions\ConfigEntityRevisionsConfigEntityInterface $config_entity
   *   The configuration entity being deleted.
   */
  public function deleteRevisions(ConfigEntityRevisionsConfigEntityInterface $config_entity);

  /**
   * Load a particular revision of a config entity.
   *
   * @param int $revision
   *   The revision ID to load.
   * @param mixed $entity
   *   The entity type to load.
   *
   * @return mixed
   *   The loaded revision or NULL.
   */
  public function loadConfigEntityRevision($revision = NULL, $entity = '');

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigEntityRevisionsRevisionStorageHandlerInterface::createInitialRevision public function Create an initial revision record. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::createUpdateRevision public function Create revision when a new config entity version is saved. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::deleteRevisions public function Delete revisions when a config entity is deleted. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::deleteSingleRevision public function Delete a single revision. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::getConfigEntity public function Get a Config Entity instance from Content Entity Revision. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::getLatestPublishedRevision public function Gets the latest published revision of the entity. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::getLatestPublishedRevisionId public function Gets the latest published revision ID of the entity. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::getLatestPublishedRevisionOrLatestId public function Gets the latest revision ID of the entity. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::getLatestRevision public function Gets the latest revision of the entity. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::getLatestRevisionId public function Gets the latest revision ID of the entity. Overrides RevisionableStorageInterface::getLatestRevisionId
ConfigEntityRevisionsRevisionStorageHandlerInterface::getRevisionIds public function Get a list of revision IDs for a content entity. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::loadConfigEntityRevision public function Load a particular revision of a config entity. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::resetDefaultRevision public function Make default the most recently published or the most recent revision. 1
ConfigEntityRevisionsRevisionStorageHandlerInterface::setConfigEntity public function Set the config entity under consideration. 1
ContentEntityStorageInterface::createWithSampleValues public function Creates an entity with sample field values. 2
EntityStorageInterface::create public function Constructs a new entity object, without permanently saving it. 1
EntityStorageInterface::delete public function Deletes permanently saved entities. 1
EntityStorageInterface::deleteRevision public function Delete a specific entity revision. 4
EntityStorageInterface::FIELD_LOAD_CURRENT constant Load the most recent version of an entity's field data.
EntityStorageInterface::FIELD_LOAD_REVISION constant Load the version of an entity's field data specified in the entity.
EntityStorageInterface::getAggregateQuery public function Gets an aggregated query instance. 1
EntityStorageInterface::getEntityType public function Gets the entity type definition. 1
EntityStorageInterface::getEntityTypeId public function Gets the entity type ID. 1
EntityStorageInterface::getQuery public function Gets an entity query instance. 1
EntityStorageInterface::hasData public function Determines if the storage contains any data. 1
EntityStorageInterface::load public function Loads one entity. 1
EntityStorageInterface::loadByProperties public function Load entities by their property values. 1
EntityStorageInterface::loadMultiple public function Loads one or more entities. 1
EntityStorageInterface::loadRevision public function Load a specific entity revision. 4
EntityStorageInterface::loadUnchanged public function Loads an unchanged entity from the database. 1
EntityStorageInterface::resetCache public function Resets the internal, static entity cache. 1
EntityStorageInterface::restore public function Restores a previously saved entity. 1
EntityStorageInterface::save public function Saves the entity permanently. 1
RevisionableStorageInterface::loadMultipleRevisions public function Loads multiple entity revisions. 2
TranslatableRevisionableStorageInterface::createRevision public function Creates a new revision starting off from the specified entity object. Overrides RevisionableStorageInterface::createRevision 2
TranslatableRevisionableStorageInterface::getLatestTranslationAffectedRevisionId public function Returns the latest revision affecting the specified translation. 2
TranslatableStorageInterface::createTranslation public function Constructs a new entity translation object, without permanently saving it. 2