Items.php 788 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Wishlist\Block\Customer\Wishlist;
  7. /**
  8. * Wishlist block customer items
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. class Items extends \Magento\Framework\View\Element\Template
  14. {
  15. /**
  16. * Retrieve table column object list
  17. *
  18. * @return \Magento\Wishlist\Block\Customer\Wishlist\Item\Column[]
  19. */
  20. public function getColumns()
  21. {
  22. $columns = [];
  23. foreach ($this->getLayout()->getChildBlocks($this->getNameInLayout()) as $child) {
  24. if ($child instanceof \Magento\Wishlist\Block\Customer\Wishlist\Item\Column && $child->isEnabled()) {
  25. $columns[] = $child;
  26. }
  27. }
  28. return $columns;
  29. }
  30. }