RowCustomizer.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\GroupedImportExport\Model\Export;
  7. use Magento\CatalogImportExport\Model\Export\RowCustomizerInterface;
  8. class RowCustomizer implements RowCustomizerInterface
  9. {
  10. /**
  11. * Prepare data for export
  12. *
  13. * @param mixed $collection
  14. * @param int $productIds
  15. * @return mixed
  16. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  17. */
  18. public function prepareData($collection, $productIds)
  19. {
  20. return;
  21. }
  22. /**
  23. * Set headers columns
  24. *
  25. * @param array $columns
  26. * @return mixed
  27. */
  28. public function addHeaderColumns($columns)
  29. {
  30. $columns = array_merge(
  31. $columns,
  32. [
  33. 'associated_skus'
  34. ]
  35. );
  36. return $columns;
  37. }
  38. /**
  39. * Add data for export
  40. *
  41. * @param array $dataRow
  42. * @param int $productId
  43. * @return mixed
  44. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  45. */
  46. public function addData($dataRow, $productId)
  47. {
  48. return $dataRow;
  49. }
  50. /**
  51. * Calculate the largest links block
  52. *
  53. * @param array $additionalRowsCount
  54. * @param int $productId
  55. * @return mixed
  56. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  57. */
  58. public function getAdditionalRowsCount($additionalRowsCount, $productId)
  59. {
  60. return $additionalRowsCount;
  61. }
  62. }