Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Checkmo.php
Go to the documentation of this file.
1 <?php
7 
9 {
13  protected $_payableTo;
14 
18  protected $_mailingAddress;
19 
23  protected $_template = 'Magento_OfflinePayments::info/checkmo.phtml';
24 
30  public function getPayableTo()
31  {
32  if ($this->_payableTo === null) {
33  $this->_convertAdditionalData();
34  }
35  return $this->_payableTo;
36  }
37 
43  public function getMailingAddress()
44  {
45  if ($this->_mailingAddress === null) {
46  $this->_convertAdditionalData();
47  }
49  }
50 
55  protected function _convertAdditionalData()
56  {
57  $this->_payableTo = $this->getInfo()->getAdditionalInformation('payable_to');
58  $this->_mailingAddress = $this->getInfo()->getAdditionalInformation('mailing_address');
59  return $this;
60  }
61 
65  public function toPdf()
66  {
67  $this->setTemplate('Magento_OfflinePayments::info/pdf/checkmo.phtml');
68  return $this->toHtml();
69  }
70 }