StoreOptionHash.php 789 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Newsletter store options
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Newsletter\Block\Subscribe\Grid\Options;
  9. class StoreOptionHash implements \Magento\Framework\Option\ArrayInterface
  10. {
  11. /**
  12. * System Store Model
  13. *
  14. * @var \Magento\Store\Model\System\Store
  15. */
  16. protected $_systemStore;
  17. /**
  18. * @param \Magento\Store\Model\System\Store $systemStore
  19. */
  20. public function __construct(\Magento\Store\Model\System\Store $systemStore)
  21. {
  22. $this->_systemStore = $systemStore;
  23. }
  24. /**
  25. * Return store array
  26. *
  27. * @return array
  28. */
  29. public function toOptionArray()
  30. {
  31. return $this->_systemStore->getStoreOptionHash();
  32. }
  33. }