BookmarkInterface.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Api\Data;
  7. /**
  8. * Bookmark interface
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface BookmarkInterface extends BookmarkExtensionInterface
  14. {
  15. /**#@+
  16. * Constants for keys of data array. Identical to the name of the getter in snake case
  17. */
  18. const BOOKMARK_ID = 'bookmark_id';
  19. const USER_ID = 'user_id';
  20. const BOOKMARKSPACE = 'namespace';
  21. const IDENTIFIER = 'identifier';
  22. const TITLE = 'title';
  23. const CONFIG = 'config';
  24. const CREATED_AT = 'created_at';
  25. const UPDATED_AT = 'updated_at';
  26. const CURRENT = 'current';
  27. /**#@-*/
  28. /**
  29. * Get ID
  30. *
  31. * @return int
  32. */
  33. public function getId();
  34. /**
  35. * Get user id
  36. *
  37. * @return int
  38. */
  39. public function getUserId();
  40. /**
  41. * Get identifier
  42. *
  43. * @return string
  44. */
  45. public function getNamespace();
  46. /**
  47. * Get identifier
  48. *
  49. * @return string
  50. */
  51. public function getIdentifier();
  52. /**
  53. * Get title
  54. *
  55. * @return string
  56. */
  57. public function getTitle();
  58. /**
  59. * Get config content
  60. *
  61. * @return array
  62. */
  63. public function getConfig();
  64. /**
  65. * Get creation time
  66. *
  67. * @return string
  68. */
  69. public function getCreatedAt();
  70. /**
  71. * Get update time
  72. *
  73. * @return string
  74. */
  75. public function getUpdatedAt();
  76. /**
  77. * Get user bookmark is current
  78. *
  79. * @return bool
  80. */
  81. public function isCurrent();
  82. /**
  83. * Set ID
  84. *
  85. * @param int $id
  86. * @return \Magento\Ui\Api\Data\BookmarkInterface
  87. */
  88. public function setId($id);
  89. /**
  90. * Set user id
  91. *
  92. * @param int $userId
  93. * @return \Magento\Ui\Api\Data\BookmarkInterface
  94. */
  95. public function setUserId($userId);
  96. /**
  97. * Set namespace
  98. *
  99. * @param string $namespace
  100. * @return \Magento\Ui\Api\Data\BookmarkInterface
  101. */
  102. public function setNamespace($namespace);
  103. /**
  104. * Set identifier
  105. *
  106. * @param string $identifier
  107. * @return \Magento\Ui\Api\Data\BookmarkInterface
  108. */
  109. public function setIdentifier($identifier);
  110. /**
  111. * Set title
  112. *
  113. * @param string $title
  114. * @return \Magento\Ui\Api\Data\BookmarkInterface
  115. */
  116. public function setTitle($title);
  117. /**
  118. * Set config content
  119. *
  120. * @param string $config
  121. * @return \Magento\Ui\Api\Data\BookmarkInterface
  122. */
  123. public function setConfig($config);
  124. /**
  125. * Set creation time
  126. *
  127. * @param string $createdAt
  128. * @return \Magento\Ui\Api\Data\BookmarkInterface
  129. */
  130. public function setCreatedAt($createdAt);
  131. /**
  132. * Set update time
  133. *
  134. * @param string $updatedAt
  135. * @return \Magento\Ui\Api\Data\BookmarkInterface
  136. */
  137. public function setUpdatedAt($updatedAt);
  138. /**
  139. * Set bookmark to current
  140. *
  141. * @param bool $isCurrent
  142. * @return \Magento\Ui\Api\Data\BookmarkInterface
  143. */
  144. public function setCurrent($isCurrent);
  145. /**
  146. * Retrieve existing extension attributes object or create a new one
  147. *
  148. * @return \Magento\Ui\Api\Data\BookmarkExtensionInterface|null
  149. */
  150. public function getExtensionAttributes();
  151. /**
  152. * Set an extension attributes object
  153. *
  154. * @param \Magento\Ui\Api\Data\BookmarkExtensionInterface $extensionAttributes
  155. * @return $this
  156. */
  157. public function setExtensionAttributes(
  158. \Magento\Ui\Api\Data\BookmarkExtensionInterface $extensionAttributes
  159. );
  160. }