DataProviderInterface.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Element\UiComponent\DataProvider;
  7. use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
  8. /**
  9. * Interface DataProviderInterface
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface DataProviderInterface
  15. {
  16. /**
  17. * Get Data Provider name
  18. *
  19. * @return string
  20. */
  21. public function getName();
  22. /**
  23. * Get config data
  24. *
  25. * @return mixed
  26. */
  27. public function getConfigData();
  28. /**
  29. * Set config data
  30. *
  31. * @param mixed $config
  32. * @return void
  33. */
  34. public function setConfigData($config);
  35. /**
  36. * @return array
  37. */
  38. public function getMeta();
  39. /**
  40. * @param string $fieldSetName
  41. * @param string $fieldName
  42. * @return array
  43. */
  44. public function getFieldMetaInfo($fieldSetName, $fieldName);
  45. /**
  46. * Get field Set meta info
  47. *
  48. * @param string $fieldSetName
  49. * @return array
  50. */
  51. public function getFieldSetMetaInfo($fieldSetName);
  52. /**
  53. * @param string $fieldSetName
  54. * @return array
  55. */
  56. public function getFieldsMetaInfo($fieldSetName);
  57. /**
  58. * Get primary field name
  59. *
  60. * @return string
  61. */
  62. public function getPrimaryFieldName();
  63. /**
  64. * Get field name in request
  65. *
  66. * @return string
  67. */
  68. public function getRequestFieldName();
  69. /**
  70. * Get data
  71. *
  72. * @return mixed
  73. */
  74. public function getData();
  75. /**
  76. * Add field filter to collection
  77. *
  78. * @param \Magento\Framework\Api\Filter $filter
  79. * @return mixed
  80. */
  81. public function addFilter(\Magento\Framework\Api\Filter $filter);
  82. /**
  83. * Add ORDER BY to the end or to the beginning
  84. *
  85. * @param string $field
  86. * @param string $direction
  87. * @return void
  88. */
  89. public function addOrder($field, $direction);
  90. /**
  91. * Set Query limit
  92. *
  93. * @param int $offset
  94. * @param int $size
  95. * @return void
  96. */
  97. public function setLimit($offset, $size);
  98. /**
  99. * Returns search criteria
  100. *
  101. * @return \Magento\Framework\Api\Search\SearchCriteriaInterface
  102. */
  103. public function getSearchCriteria();
  104. /**
  105. * @return \Magento\Framework\Api\Search\SearchResultInterface
  106. */
  107. public function getSearchResult();
  108. }