EavAttributeInterface.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Catalog\Api\Data;
  8. /**
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface EavAttributeInterface extends \Magento\Eav\Api\Data\AttributeInterface
  13. {
  14. const IS_WYSIWYG_ENABLED = 'is_wysiwyg_enabled';
  15. const IS_HTML_ALLOWED_ON_FRONT = 'is_html_allowed_on_front';
  16. const USED_FOR_SORT_BY = 'used_for_sort_by';
  17. const IS_FILTERABLE = 'is_filterable';
  18. const IS_FILTERABLE_IN_SEARCH = 'is_filterable_in_search';
  19. const IS_USED_IN_GRID = 'is_used_in_grid';
  20. const IS_VISIBLE_IN_GRID = 'is_visible_in_grid';
  21. const IS_FILTERABLE_IN_GRID = 'is_filterable_in_grid';
  22. const POSITION = 'position';
  23. const APPLY_TO = 'apply_to';
  24. const IS_SEARCHABLE = 'is_searchable';
  25. const IS_VISIBLE_IN_ADVANCED_SEARCH = 'is_visible_in_advanced_search';
  26. const IS_COMPARABLE = 'is_comparable';
  27. const IS_USED_FOR_PROMO_RULES = 'is_used_for_promo_rules';
  28. const IS_VISIBLE_ON_FRONT = 'is_visible_on_front';
  29. const USED_IN_PRODUCT_LISTING = 'used_in_product_listing';
  30. const IS_VISIBLE = 'is_visible';
  31. const SCOPE_STORE_TEXT = 'store';
  32. const SCOPE_GLOBAL_TEXT = 'global';
  33. const SCOPE_WEBSITE_TEXT = 'website';
  34. /**
  35. * Enable WYSIWYG flag
  36. *
  37. * @return bool|null
  38. */
  39. public function getIsWysiwygEnabled();
  40. /**
  41. * Set whether WYSIWYG is enabled flag
  42. *
  43. * @param bool $isWysiwygEnabled
  44. * @return $this
  45. */
  46. public function setIsWysiwygEnabled($isWysiwygEnabled);
  47. /**
  48. * Whether the HTML tags are allowed on the frontend
  49. *
  50. * @return bool|null
  51. */
  52. public function getIsHtmlAllowedOnFront();
  53. /**
  54. * Set whether the HTML tags are allowed on the frontend
  55. *
  56. * @param bool $isHtmlAllowedOnFront
  57. * @return $this
  58. */
  59. public function setIsHtmlAllowedOnFront($isHtmlAllowedOnFront);
  60. /**
  61. * Whether it is used for sorting in product listing
  62. *
  63. * @return bool|null
  64. */
  65. public function getUsedForSortBy();
  66. /**
  67. * Set whether it is used for sorting in product listing
  68. *
  69. * @param bool $usedForSortBy
  70. * @return $this
  71. */
  72. public function setUsedForSortBy($usedForSortBy);
  73. /**
  74. * Whether it used in layered navigation
  75. *
  76. * @return bool|null
  77. */
  78. public function getIsFilterable();
  79. /**
  80. * Set whether it used in layered navigation
  81. *
  82. * @param bool $isFilterable
  83. * @return $this
  84. */
  85. public function setIsFilterable($isFilterable);
  86. /**
  87. * Whether it is used in search results layered navigation
  88. *
  89. * @return bool|null
  90. */
  91. public function getIsFilterableInSearch();
  92. /**
  93. * Whether it is used in catalog product grid
  94. *
  95. * @return bool|null
  96. */
  97. public function getIsUsedInGrid();
  98. /**
  99. * Whether it is visible in catalog product grid
  100. *
  101. * @return bool|null
  102. */
  103. public function getIsVisibleInGrid();
  104. /**
  105. * Whether it is filterable in catalog product grid
  106. *
  107. * @return bool|null
  108. */
  109. public function getIsFilterableInGrid();
  110. /**
  111. * Set is attribute used in grid
  112. *
  113. * @param bool|null $isUsedInGrid
  114. * @return $this
  115. * @since 102.0.0
  116. */
  117. public function setIsUsedInGrid($isUsedInGrid);
  118. /**
  119. * Set is attribute visible in grid
  120. *
  121. * @param bool|null $isVisibleInGrid
  122. * @return $this
  123. * @since 102.0.0
  124. */
  125. public function setIsVisibleInGrid($isVisibleInGrid);
  126. /**
  127. * Set is attribute filterable in grid
  128. *
  129. * @param bool|null $isFilterableInGrid
  130. * @return $this
  131. * @since 102.0.0
  132. */
  133. public function setIsFilterableInGrid($isFilterableInGrid);
  134. /**
  135. * Set whether it is used in search results layered navigation
  136. *
  137. * @param bool $isFilterableInSearch
  138. * @return $this
  139. */
  140. public function setIsFilterableInSearch($isFilterableInSearch);
  141. /**
  142. * Get position
  143. *
  144. * @return int|null
  145. */
  146. public function getPosition();
  147. /**
  148. * Set position
  149. *
  150. * @param int $position
  151. * @return $this
  152. */
  153. public function setPosition($position);
  154. /**
  155. * Get apply to value for the element
  156. *
  157. * Apply to. Empty for "Apply to all"
  158. * or array of the following possible values:
  159. * - 'simple',
  160. * - 'grouped',
  161. * - 'configurable',
  162. * - 'virtual',
  163. * - 'bundle',
  164. * - 'downloadable'
  165. *
  166. * @return string[]|null
  167. */
  168. public function getApplyTo();
  169. /**
  170. * Set apply to value for the element
  171. *
  172. * @param string[]|string $applyTo
  173. * @return $this
  174. */
  175. public function setApplyTo($applyTo);
  176. /**
  177. * Whether the attribute can be used in Quick Search
  178. *
  179. * @return string|null
  180. */
  181. public function getIsSearchable();
  182. /**
  183. * Whether the attribute can be used in Quick Search
  184. *
  185. * @param string $isSearchable
  186. * @return $this
  187. */
  188. public function setIsSearchable($isSearchable);
  189. /**
  190. * Whether the attribute can be used in Advanced Search
  191. *
  192. * @return string|null
  193. */
  194. public function getIsVisibleInAdvancedSearch();
  195. /**
  196. * Set whether the attribute can be used in Advanced Search
  197. *
  198. * @param string $isVisibleInAdvancedSearch
  199. * @return $this
  200. */
  201. public function setIsVisibleInAdvancedSearch($isVisibleInAdvancedSearch);
  202. /**
  203. * Whether the attribute can be compared on the frontend
  204. *
  205. * @return string|null
  206. */
  207. public function getIsComparable();
  208. /**
  209. * Set whether the attribute can be compared on the frontend
  210. *
  211. * @param string $isComparable
  212. * @return $this
  213. */
  214. public function setIsComparable($isComparable);
  215. /**
  216. * Whether the attribute can be used for promo rules
  217. *
  218. * @return string|null
  219. */
  220. public function getIsUsedForPromoRules();
  221. /**
  222. * Set whether the attribute can be used for promo rules
  223. *
  224. * @param string $isUsedForPromoRules
  225. * @return $this
  226. */
  227. public function setIsUsedForPromoRules($isUsedForPromoRules);
  228. /**
  229. * Whether the attribute is visible on the frontend
  230. *
  231. * @return string|null
  232. */
  233. public function getIsVisibleOnFront();
  234. /**
  235. * Set whether the attribute is visible on the frontend
  236. *
  237. * @param string $isVisibleOnFront
  238. * @return $this
  239. */
  240. public function setIsVisibleOnFront($isVisibleOnFront);
  241. /**
  242. * Whether the attribute can be used in product listing
  243. *
  244. * @return string|null
  245. */
  246. public function getUsedInProductListing();
  247. /**
  248. * Set whether the attribute can be used in product listing
  249. *
  250. * @param string $usedInProductListing
  251. * @return $this
  252. */
  253. public function setUsedInProductListing($usedInProductListing);
  254. /**
  255. * Whether attribute is visible on frontend.
  256. *
  257. * @return bool|null
  258. */
  259. public function getIsVisible();
  260. /**
  261. * Set whether attribute is visible on frontend.
  262. *
  263. * @param bool $isVisible
  264. * @return $this
  265. */
  266. public function setIsVisible($isVisible);
  267. /**
  268. * Retrieve attribute scope
  269. *
  270. * @return string|null
  271. */
  272. public function getScope();
  273. /**
  274. * Set attribute scope
  275. *
  276. * @param string $scope
  277. * @return $this
  278. */
  279. public function setScope($scope);
  280. /**
  281. * @return \Magento\Catalog\Api\Data\EavAttributeExtensionInterface|null
  282. */
  283. public function getExtensionAttributes();
  284. }