![]() 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/app/code/Smartwave/Porto/Block/ |
<?php namespace Smartwave\Porto\Block; class Template extends \Magento\Framework\View\Element\Template { public $_coreRegistry; public function __construct( \Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $coreRegistry, array $data = [] ) { $this->_coreRegistry = $coreRegistry; parent::__construct($context, $data); } public function getConfig($config_path, $storeCode = null) { return $this->_scopeConfig->getValue( $config_path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeCode ); } public function getFooterLogoSrc(){ $folderName = \Smartwave\Porto\Model\Config\Backend\Image\Logo::UPLOAD_DIR; $storeLogoPath = $this->_scopeConfig->getValue( 'porto_settings/footer/footer_logo_src', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); $path = $folderName . '/' . $storeLogoPath; $logoUrl = $this->_urlBuilder ->getBaseUrl(['_type' => \Magento\Framework\UrlInterface::URL_TYPE_MEDIA]) . $path; return $logoUrl; } public function isHomePage() { $currentUrl = $this->getUrl('', ['_current' => true]); $urlRewrite = $this->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]); return $currentUrl == $urlRewrite; } } ?>