ExportInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\Block\Widget\Grid;
  7. /**
  8. * Interface ExportInterface
  9. *
  10. * @api
  11. * @deprecated 100.2.0 in favour of UI component implementation
  12. * @since 100.0.2
  13. */
  14. interface ExportInterface
  15. {
  16. /**
  17. * Retrieve grid export types
  18. *
  19. * @return array|bool
  20. * @api
  21. */
  22. public function getExportTypes();
  23. /**
  24. * Retrieve grid id
  25. *
  26. * @return string
  27. * @api
  28. */
  29. public function getId();
  30. /**
  31. * Render export button
  32. *
  33. * @return string
  34. */
  35. public function getExportButtonHtml();
  36. /**
  37. * Add new export type to grid
  38. *
  39. * @param string $url
  40. * @param string $label
  41. * @return \Magento\Backend\Block\Widget\Grid
  42. */
  43. public function addExportType($url, $label);
  44. /**
  45. * Retrieve a file container array by grid data as CSV
  46. *
  47. * Return array with keys type and value
  48. *
  49. * @return array
  50. * @api
  51. */
  52. public function getCsvFile();
  53. /**
  54. * Retrieve Grid data as CSV
  55. *
  56. * @return string
  57. * @api
  58. */
  59. public function getCsv();
  60. /**
  61. * Retrieve data in xml
  62. *
  63. * @return string
  64. * @api
  65. */
  66. public function getXml();
  67. /**
  68. * Retrieve a file container array by grid data as MS Excel 2003 XML Document
  69. *
  70. * Return array with keys type and value
  71. *
  72. * @param string $sheetName
  73. * @return array
  74. * @api
  75. */
  76. public function getExcelFile($sheetName = '');
  77. /**
  78. * Retrieve grid data as MS Excel 2003 XML Document
  79. *
  80. * @return string
  81. * @api
  82. */
  83. public function getExcel();
  84. }