RequireBillingAddress.php 785 B

123456789101112131415161718192021222324252627282930313233
  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;
  7. /**
  8. * Source model for Require Billing Address
  9. */
  10. class RequireBillingAddress 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. return $this->_configFactory->create()->getRequireBillingAddressOptions();
  29. }
  30. }