HeartbeatStreamInterface.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?php
  2. namespace Drupal\heartbeat\Entity;
  3. use Drupal\Core\Entity\RevisionLogInterface;
  4. use Drupal\Core\Entity\RevisionableInterface;
  5. use Drupal\Component\Utility\Xss;
  6. use Drupal\Core\Url;
  7. use Drupal\Core\Entity\EntityChangedInterface;
  8. use Drupal\user\EntityOwnerInterface;
  9. /**
  10. * Provides an interface for defining Heartbeat stream entities.
  11. *
  12. * @ingroup heartbeat
  13. */
  14. interface HeartbeatStreamInterface extends RevisionableInterface, RevisionLogInterface, EntityChangedInterface, EntityOwnerInterface {
  15. // Add get/set methods for your configuration properties here.
  16. /**
  17. * Gets the Heartbeat stream name.
  18. *
  19. * @return string
  20. * Name of the Heartbeat stream.
  21. */
  22. public function getName();
  23. /**
  24. * Sets the Heartbeat stream name.
  25. *
  26. * @param string $name
  27. * The Heartbeat stream name.
  28. *
  29. * @return \Drupal\heartbeat\Entity\HeartbeatStreamInterface
  30. * The called Heartbeat stream entity.
  31. */
  32. public function setName($name);
  33. /**
  34. * Gets the Heartbeat stream creation timestamp.
  35. *
  36. * @return int
  37. * Creation timestamp of the Heartbeat stream.
  38. */
  39. public function getCreatedTime();
  40. /**
  41. * Sets the Heartbeat stream creation timestamp.
  42. *
  43. * @param int $timestamp
  44. * The Heartbeat stream creation timestamp.
  45. *
  46. * @return \Drupal\heartbeat\Entity\HeartbeatStreamInterface
  47. * The called Heartbeat stream entity.
  48. */
  49. public function setCreatedTime($timestamp);
  50. /**
  51. * Returns the Heartbeat stream published status indicator.
  52. *
  53. * Unpublished Heartbeat stream are only visible to restricted users.
  54. *
  55. * @return bool
  56. * TRUE if the Heartbeat stream is published.
  57. */
  58. public function isPublished();
  59. /**
  60. * Sets the published status of a Heartbeat stream.
  61. *
  62. * @param bool $published
  63. * TRUE to set this Heartbeat stream to published, FALSE to set it to unpublished.
  64. *
  65. * @return \Drupal\heartbeat\Entity\HeartbeatStreamInterface
  66. * The called Heartbeat stream entity.
  67. */
  68. public function setPublished($published);
  69. /**
  70. * Gets the Heartbeat stream revision creation timestamp.
  71. *
  72. * @return int
  73. * The UNIX timestamp of when this revision was created.
  74. */
  75. public function getRevisionCreationTime();
  76. /**
  77. * Sets the Heartbeat stream revision creation timestamp.
  78. *
  79. * @param int $timestamp
  80. * The UNIX timestamp of when this revision was created.
  81. *
  82. * @return \Drupal\heartbeat\Entity\HeartbeatStreamInterface
  83. * The called Heartbeat stream entity.
  84. */
  85. public function setRevisionCreationTime($timestamp);
  86. /**
  87. * Gets the Heartbeat stream revision author.
  88. *
  89. * @return \Drupal\user\UserInterface
  90. * The user entity for the revision author.
  91. */
  92. public function getRevisionUser();
  93. /**
  94. * Sets the Heartbeat stream revision author.
  95. *
  96. * @param int $uid
  97. * The user ID of the revision author.
  98. *
  99. * @return \Drupal\heartbeat\Entity\HeartbeatStreamInterface
  100. * The called Heartbeat stream entity.
  101. */
  102. public function setRevisionUserId($uid);
  103. /**
  104. * @return mixed
  105. */
  106. public function getClass();
  107. /**
  108. * @param mixed $class
  109. */
  110. public function setClass($class);
  111. /**
  112. * @return mixed
  113. */
  114. public function getRealClass();
  115. /**
  116. * @param mixed $real_class
  117. */
  118. public function setRealClass($real_class);
  119. /**
  120. * @return mixed
  121. */
  122. public function getPath();
  123. /**
  124. * @param mixed $path
  125. */
  126. public function setPath($path);
  127. /**
  128. * @return mixed
  129. */
  130. public function getTitle();
  131. /**
  132. * @param mixed $title
  133. */
  134. public function setTitle($title);
  135. /**
  136. * @return mixed
  137. */
  138. public function getModule();
  139. /**
  140. * @param mixed $module
  141. */
  142. public function setModule($module);
  143. /**
  144. * @return mixed
  145. */
  146. public function getVariables();
  147. /**
  148. * @param mixed $variables
  149. */
  150. public function setVariables($variables);
  151. /**
  152. * @return mixed
  153. */
  154. public function getSettings();
  155. /**
  156. * @param mixed $settings
  157. */
  158. public function setSettings($settings);
  159. /**
  160. * @return mixed
  161. */
  162. public function getTypes();
  163. /**
  164. * @param $heartbeat_types
  165. * @return mixed
  166. */
  167. public function setTypes($heartbeat_types);
  168. /**
  169. * @return mixed
  170. */
  171. public function setWeight($weight);
  172. /**
  173. * @param $weight
  174. * @return mixed
  175. */
  176. public function getWeight();
  177. }