FieldMapperInterface.php 806 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Elasticsearch\Model\Adapter;
  7. /**
  8. * @api
  9. * @since 100.1.0
  10. */
  11. interface FieldMapperInterface
  12. {
  13. /**#@+
  14. * Text flags for field mapping context
  15. */
  16. const TYPE_QUERY = 'text';
  17. const TYPE_SORT = 'sort';
  18. const TYPE_FILTER = 'default';
  19. /**#@-*/
  20. /**
  21. * Get field name
  22. *
  23. * @param string $attributeCode
  24. * @param array $context
  25. * @return string
  26. * @since 100.1.0
  27. */
  28. public function getFieldName($attributeCode, $context = []);
  29. /**
  30. * Get all entity attribute types
  31. *
  32. * @param array $context
  33. * @return array
  34. * @since 100.1.0
  35. */
  36. public function getAllAttributesTypes($context = []);
  37. }