Options.php 620 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Design\Theme\Label;
  7. use Magento\Framework\Option\ArrayInterface;
  8. class Options implements ArrayInterface
  9. {
  10. /**
  11. * @var ListInterface
  12. */
  13. protected $list;
  14. /**
  15. * @param ListInterface $list
  16. */
  17. public function __construct(ListInterface $list)
  18. {
  19. $this->list = $list;
  20. }
  21. /**
  22. * Return list of themes
  23. *
  24. * @return array
  25. */
  26. public function toOptionArray()
  27. {
  28. return $this->list->getLabels();
  29. }
  30. }