Substitution.php 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Payment\Model\Method;
  7. /**
  8. * Substitution payment method for non-existing payments
  9. *
  10. * @method \Magento\Quote\Api\Data\PaymentMethodExtensionInterface getExtensionAttributes()
  11. */
  12. class Substitution extends AbstractMethod
  13. {
  14. /**
  15. * Method code
  16. */
  17. const CODE = 'substitution';
  18. /**
  19. * Key of title in instance additional information
  20. */
  21. const INFO_KEY_TITLE = 'method_title';
  22. /**
  23. * @var string
  24. */
  25. protected $_code = self::CODE;
  26. /**
  27. * @var string
  28. */
  29. protected $_infoBlockType = \Magento\Payment\Block\Info\Substitution::class;
  30. /**
  31. * Retrieve payment method title
  32. *
  33. * @return string
  34. */
  35. public function getTitle()
  36. {
  37. return $this->getInfoInstance()->getAdditionalInformation(self::INFO_KEY_TITLE);
  38. }
  39. }