You are here

interface EntityRevisionLogInterface in Entity API 8.0

Defines an entity type with create time/author/log information for revisions.

Hierarchy

Expanded class hierarchy of EntityRevisionLogInterface

All classes that implement EntityRevisionLogInterface

2 files declare their use of EntityRevisionLogInterface
RevisionOverviewController.php in src/Controller/RevisionOverviewController.php
Contains \Drupal\entity\Controller\RevisionOverviewController.
RevisionRevertForm.php in src/Form/RevisionRevertForm.php
Contains \Drupal\entity\Form\RevisionRevertForm.

File

src/Revision/EntityRevisionLogInterface.php, line 15
Contains \Drupal\entity\Revision\EntityRevisionLogInterface.

Namespace

Drupal\entity\Revision
View source
interface EntityRevisionLogInterface {

  /**
   * Gets the entity revision creation timestamp.
   *
   * @return int|NULL
   *   The UNIX timestamp of when this revision was created. Return NULL if the
   *   entity type does not support revision create time.
   */
  public function getRevisionCreationTime();

  /**
   * Sets the entity revision creation timestamp.
   *
   * @param int $timestamp
   *   The UNIX timestamp of when this revision was created.
   *
   * @return $this
   */
  public function setRevisionCreationTime($timestamp);

  /**
   * Gets the entity revision author.
   *
   * @return \Drupal\user\UserInterface|NULL
   *   The user entity for the revision author. Return NULL if the entity type
   *   doesn't support revision authors.
   */
  public function getRevisionUser();

  /**
   * Sets the entity revision author.
   *
   * @param \Drupal\user\UserInterface $account
   *   The user account of the revision author.
   *
   * @return $this
   */
  public function setRevisionUser(UserInterface $account);

  /**
   * Gets the entity revision author ID.
   *
   * @return int
   *   The user ID.
   */
  public function getRevisionUserId();

  /**
   * Sets the entity revision author by ID.
   *
   * @param int $user_id
   *   The user ID of the revision author.
   *
   * @return $this
   */
  public function setRevisionUserId($user_id);

  /**
   * Returns the entity revision log message.
   *
   * @return string|NULL
   *   The revision log message. Return NULL if the entity type doesn't support
   *   revision logs.
   */
  public function getRevisionLogMessage();

  /**
   * Sets the entity revision log message.
   *
   * @param string $revision_log_message
   *   The revision log message.
   *
   * @return $this
   */
  public function setRevisionLogMessage($revision_log_message);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityRevisionLogInterface::getRevisionCreationTime public function Gets the entity revision creation timestamp.
EntityRevisionLogInterface::getRevisionLogMessage public function Returns the entity revision log message.
EntityRevisionLogInterface::getRevisionUser public function Gets the entity revision author.
EntityRevisionLogInterface::getRevisionUserId public function Gets the entity revision author ID.
EntityRevisionLogInterface::setRevisionCreationTime public function Sets the entity revision creation timestamp.
EntityRevisionLogInterface::setRevisionLogMessage public function Sets the entity revision log message.
EntityRevisionLogInterface::setRevisionUser public function Sets the entity revision author.
EntityRevisionLogInterface::setRevisionUserId public function Sets the entity revision author by ID.