Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Logo.php
Go to the documentation of this file.
1 <?php
10 namespace Magento\Paypal\Block;
11 
17 {
21  protected $_paypalConfig;
22 
26  protected $_localeResolver;
27 
34  public function __construct(
35  \Magento\Framework\View\Element\Template\Context $context,
36  \Magento\Paypal\Model\Config $paypalConfig,
37  \Magento\Framework\Locale\ResolverInterface $localeResolver,
38  array $data = []
39  ) {
40  $this->_paypalConfig = $paypalConfig;
41  $this->_localeResolver = $localeResolver;
42  parent::__construct($context, $data);
43  }
44 
50  public function getAboutPaypalPageUrl()
51  {
52  return $this->_getConfig()->getPaymentMarkWhatIsPaypalUrl($this->_localeResolver);
53  }
54 
60  protected function _getConfig()
61  {
62  return $this->_paypalConfig;
63  }
64 
70  protected function _toHtml()
71  {
72  $type = $this->getLogoType();
73  // assigned in layout etc.
74  $logoUrl = $this->_getConfig()->getAdditionalOptionsLogoUrl($this->_localeResolver->getLocale(), $type);
75  if (!$logoUrl) {
76  return '';
77  }
78  $this->setLogoImageUrl($logoUrl);
79  return parent::_toHtml();
80  }
81 }
$type
Definition: item.phtml:13
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Model\Config $paypalConfig, \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data=[])
Definition: Logo.php:34