ThemeId.php 1023 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Widget\Model\ResourceModel\Widget\Instance\Options;
  7. /**
  8. * Widget Instance Theme Id Options
  9. *
  10. * @deprecated 100.1.7 created new class that correctly loads theme options and whose name follows naming convention
  11. * @see \Magento\Widget\Model\ResourceModel\Widget\Instance\Options\Themes
  12. */
  13. class ThemeId implements \Magento\Framework\Option\ArrayInterface
  14. {
  15. /**
  16. * @var \Magento\Widget\Model\Widget\Instance
  17. */
  18. protected $_resourceModel;
  19. /**
  20. * @param \Magento\Theme\Model\ResourceModel\Theme\CollectionFactory $widgetResourceModel
  21. */
  22. public function __construct(\Magento\Theme\Model\ResourceModel\Theme\CollectionFactory $widgetResourceModel)
  23. {
  24. $this->_resourceModel = $widgetResourceModel->create();
  25. }
  26. /**
  27. * @return array
  28. */
  29. public function toOptionArray()
  30. {
  31. return $this->_resourceModel->toOptionHash();
  32. }
  33. }