Column.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Component\MassAction\Columns;
  7. use Magento\Ui\Component\AbstractComponent;
  8. use Magento\Framework\View\Element\UiComponentFactory;
  9. use Magento\Framework\View\Element\UiComponentInterface;
  10. use Magento\Ui\Component\Listing\Columns\ColumnInterface;
  11. use Magento\Framework\View\Element\UiComponent\ContextInterface;
  12. /**
  13. * Class Column
  14. */
  15. class Column extends AbstractComponent implements ColumnInterface
  16. {
  17. const NAME = 'column.massaction';
  18. /**
  19. * Wrapped component
  20. *
  21. * @var UiComponentInterface
  22. */
  23. protected $wrappedComponent;
  24. /**
  25. * UI component factory
  26. *
  27. * @var UiComponentFactory
  28. */
  29. protected $uiComponentFactory;
  30. /**
  31. * Constructor
  32. *
  33. * @param ContextInterface $context
  34. * @param UiComponentFactory $uiComponentFactory
  35. * @param array $components
  36. * @param array $data
  37. */
  38. public function __construct(
  39. ContextInterface $context,
  40. UiComponentFactory $uiComponentFactory,
  41. array $components = [],
  42. array $data = []
  43. ) {
  44. $this->uiComponentFactory = $uiComponentFactory;
  45. parent::__construct($context, $components, $data);
  46. }
  47. /**
  48. * Get component name
  49. *
  50. * @return string
  51. */
  52. public function getComponentName()
  53. {
  54. return static::NAME;
  55. }
  56. /**
  57. * Prepare items
  58. *
  59. * @param array $items
  60. * @return array
  61. */
  62. public function prepareItems(array & $items)
  63. {
  64. return $items;
  65. }
  66. }