Express.php 971 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Paypal\Model\System\Config\Source\PaymentActions;
  7. /**
  8. * Source model for available paypal express payment actions
  9. */
  10. class Express implements \Magento\Framework\Option\ArrayInterface
  11. {
  12. /**
  13. * @var \Magento\Paypal\Model\ConfigFactory
  14. */
  15. protected $_configFactory;
  16. /**
  17. * @param \Magento\Paypal\Model\ConfigFactory $configFactory
  18. */
  19. public function __construct(\Magento\Paypal\Model\ConfigFactory $configFactory)
  20. {
  21. $this->_configFactory = $configFactory;
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function toOptionArray()
  27. {
  28. /** @var \Magento\Paypal\Model\Config $configModel */
  29. $configModel = $this->_configFactory->create();
  30. $configModel->setMethod(\Magento\Paypal\Model\Config::METHOD_WPP_EXPRESS);
  31. return $configModel->getPaymentActions();
  32. }
  33. }