Enabled.php 737 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Multishipping\Model\Payment\Method\Specification;
  7. use Magento\Payment\Model\Method\Specification\AbstractSpecification;
  8. /**
  9. * Enable method specification
  10. */
  11. class Enabled extends AbstractSpecification
  12. {
  13. /**
  14. * Allow multiple address flag
  15. */
  16. const FLAG_ALLOW_MULTIPLE_ADDRESS = 'allow_multiple_address';
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function isSatisfiedBy($paymentMethod)
  21. {
  22. return isset(
  23. $this->methodsInfo[$paymentMethod][self::FLAG_ALLOW_MULTIPLE_ADDRESS]
  24. ) && $this->methodsInfo[$paymentMethod][self::FLAG_ALLOW_MULTIPLE_ADDRESS];
  25. }
  26. }