OptionsFactory.php 807 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Widget\Model\Widget\Instance;
  7. class OptionsFactory
  8. {
  9. /**
  10. * @var \Magento\Framework\ObjectManagerInterface
  11. */
  12. protected $_objectManager;
  13. /**
  14. * @param \Magento\Framework\ObjectManagerInterface $objectManager
  15. */
  16. public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
  17. {
  18. $this->_objectManager = $objectManager;
  19. }
  20. /**
  21. * Create new action object
  22. *
  23. * @param string $type
  24. * @param array $data
  25. * @return \Magento\Framework\Option\ArrayInterface
  26. */
  27. public function create($type, array $data = [])
  28. {
  29. return $this->_objectManager->create($type, $data);
  30. }
  31. }