AttributeSetRepositoryInterface.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Eav\Api;
  8. /**
  9. * Interface AttributeSetRepositoryInterface
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface AttributeSetRepositoryInterface
  14. {
  15. /**
  16. * Retrieve list of Attribute Sets
  17. *
  18. * This call returns an array of objects, but detailed information about each object’s attributes might not be
  19. * included. See https://devdocs.magento.com/codelinks/attributes.html#AttributeSetRepositoryInterface to determine
  20. * which call to use to get detailed information about all attributes for an object.
  21. *
  22. * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
  23. * @return \Magento\Eav\Api\Data\AttributeSetSearchResultsInterface
  24. */
  25. public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria);
  26. /**
  27. * Retrieve attribute set information based on given ID
  28. *
  29. * @param int $attributeSetId
  30. * @throws \Magento\Framework\Exception\NoSuchEntityException If $attributeSetId is not found
  31. * @return \Magento\Eav\Api\Data\AttributeSetInterface
  32. */
  33. public function get($attributeSetId);
  34. /**
  35. * Save attribute set data
  36. *
  37. * @param \Magento\Eav\Api\Data\AttributeSetInterface $attributeSet
  38. * @return \Magento\Eav\Api\Data\AttributeSetInterface saved attribute set
  39. * @throws \Magento\Framework\Exception\InputException
  40. * @throws \Magento\Framework\Exception\NoSuchEntityException
  41. * @throws \Magento\Framework\Exception\LocalizedException If attribute set is not found
  42. */
  43. public function save(\Magento\Eav\Api\Data\AttributeSetInterface $attributeSet);
  44. /**
  45. * Remove attribute set by given ID
  46. *
  47. * @param int $attributeSetId
  48. * @throws \Magento\Framework\Exception\NoSuchEntityException
  49. * @throws \Magento\Framework\Exception\InputException
  50. * @return bool
  51. */
  52. public function deleteById($attributeSetId);
  53. /**
  54. * Remove given attribute set
  55. *
  56. * @param \Magento\Eav\Api\Data\AttributeSetInterface $attributeSet
  57. * @throws \Magento\Framework\Exception\NoSuchEntityException
  58. * @throws \Magento\Framework\Exception\InputException
  59. * @return bool
  60. */
  61. public function delete(\Magento\Eav\Api\Data\AttributeSetInterface $attributeSet);
  62. }