MetadataInterface.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Api;
  7. /**
  8. * Interface for getting attributes metadata. Note that this interface should not be used directly, use its children.
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface MetadataInterface extends \Magento\Framework\Api\MetadataServiceInterface
  13. {
  14. /**
  15. * Retrieve all attributes filtered by form code
  16. *
  17. * @param string $formCode
  18. * @return \Magento\Customer\Api\Data\AttributeMetadataInterface[]
  19. * @throws \Magento\Framework\Exception\LocalizedException
  20. */
  21. public function getAttributes($formCode);
  22. /**
  23. * Retrieve attribute metadata.
  24. *
  25. * @param string $attributeCode
  26. * @return \Magento\Customer\Api\Data\AttributeMetadataInterface
  27. * @throws \Magento\Framework\Exception\NoSuchEntityException
  28. * @throws \Magento\Framework\Exception\LocalizedException
  29. */
  30. public function getAttributeMetadata($attributeCode);
  31. /**
  32. * Get all attribute metadata.
  33. *
  34. * @return \Magento\Customer\Api\Data\AttributeMetadataInterface[]
  35. * @throws \Magento\Framework\Exception\LocalizedException
  36. */
  37. public function getAllAttributesMetadata();
  38. /**
  39. * Get custom attributes metadata for the given data interface.
  40. *
  41. * @param string $dataInterfaceName
  42. * @return \Magento\Customer\Api\Data\AttributeMetadataInterface[]
  43. * @throws \Magento\Framework\Exception\LocalizedException
  44. */
  45. public function getCustomAttributesMetadata($dataInterfaceName = '');
  46. }