![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/magento/module-paypal/Block/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** * PayPal online logo with additional options */ namespace Magento\Paypal\Block; /** * @api * @since 100.0.2 */ class Logo extends \Magento\Framework\View\Element\Template { /** * @var \Magento\Paypal\Model\Config */ protected $_paypalConfig; /** * @var \Magento\Framework\Locale\ResolverInterface */ protected $_localeResolver; /** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Paypal\Model\Config $paypalConfig * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Paypal\Model\Config $paypalConfig, \Magento\Framework\Locale\ResolverInterface $localeResolver, array $data = [] ) { $this->_paypalConfig = $paypalConfig; $this->_localeResolver = $localeResolver; parent::__construct($context, $data); } /** * Return URL for Paypal Landing page * * @return string */ public function getAboutPaypalPageUrl() { return $this->_getConfig()->getPaymentMarkWhatIsPaypalUrl($this->_localeResolver); } /** * Getter for paypal config * * @return \Magento\Paypal\Model\Config */ protected function _getConfig() { return $this->_paypalConfig; } /** * Disable block output if logo turned off * * @return string */ protected function _toHtml() { $type = $this->getLogoType(); // assigned in layout etc. $logoUrl = $this->_getConfig()->getAdditionalOptionsLogoUrl($this->_localeResolver->getLocale(), $type); if (!$logoUrl) { return ''; } $this->setLogoImageUrl($logoUrl); return parent::_toHtml(); } }