RevisionLogInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace Drupal\Core\Entity;
  3. use Drupal\user\UserInterface;
  4. /**
  5. * Defines methods for an entity that supports revision logging and ownership.
  6. */
  7. interface RevisionLogInterface extends RevisionableInterface {
  8. /**
  9. * Gets the entity revision creation timestamp.
  10. *
  11. * @return int
  12. * The UNIX timestamp of when this revision was created.
  13. */
  14. public function getRevisionCreationTime();
  15. /**
  16. * Sets the entity revision creation timestamp.
  17. *
  18. * @param int $timestamp
  19. * The UNIX timestamp of when this revision was created.
  20. *
  21. * @return $this
  22. */
  23. public function setRevisionCreationTime($timestamp);
  24. /**
  25. * Gets the entity revision author.
  26. *
  27. * @return \Drupal\user\UserInterface
  28. * The user entity for the revision author.
  29. */
  30. public function getRevisionUser();
  31. /**
  32. * Sets the entity revision author.
  33. *
  34. * @param \Drupal\user\UserInterface $account
  35. * The user account of the revision author.
  36. *
  37. * @return $this
  38. */
  39. public function setRevisionUser(UserInterface $account);
  40. /**
  41. * Gets the entity revision author ID.
  42. *
  43. * @return int
  44. * The user ID.
  45. */
  46. public function getRevisionUserId();
  47. /**
  48. * Sets the entity revision author by ID.
  49. *
  50. * @param int $user_id
  51. * The user ID of the revision author.
  52. *
  53. * @return $this
  54. */
  55. public function setRevisionUserId($user_id);
  56. /**
  57. * Returns the entity revision log message.
  58. *
  59. * @return string
  60. * The revision log message.
  61. */
  62. public function getRevisionLogMessage();
  63. /**
  64. * Sets the entity revision log message.
  65. *
  66. * @param string $revision_log_message
  67. * The revision log message.
  68. *
  69. * @return $this
  70. */
  71. public function setRevisionLogMessage($revision_log_message);
  72. }