RevisionLogInterface.php 1.74 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
<?php

namespace Drupal\Core\Entity;

use Drupal\user\UserInterface;

/**
 * Defines methods for an entity that supports revision logging and ownership.
 */
interface RevisionLogInterface extends RevisionableInterface {

  /**
   * Gets the entity revision creation timestamp.
   *
   * @return int
   *   The UNIX timestamp of when this revision was created.
   */
  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
   *   The user entity for the revision author.
   */
  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
   *   The revision log message.
   */
  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);

}