![]() 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/old/vendor/magento/module-theme/Block/Html/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Theme\Block\Html; use Magento\Customer\Model\Context; /** * Html page footer block * * @api * @since 100.0.2 */ class Footer extends \Magento\Framework\View\Element\Template implements \Magento\Framework\DataObject\IdentityInterface { /** * Copyright information * * @var string */ protected $_copyright; /** * Miscellaneous HTML information * * @var string */ private $miscellaneousHtml; /** * @var \Magento\Framework\App\Http\Context */ protected $httpContext; /** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\App\Http\Context $httpContext * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\Http\Context $httpContext, array $data = [] ) { $this->httpContext = $httpContext; parent::__construct($context, $data); } /** * Set footer data * * @return void */ protected function _construct() { $this->addData( [ 'cache_tags' => [\Magento\Store\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG], ] ); } /** * Get cache key informative items * * @return array */ public function getCacheKeyInfo() { return [ 'PAGE_FOOTER', $this->_storeManager->getStore()->getId(), (int)$this->_storeManager->getStore()->isCurrentlySecure(), $this->_design->getDesignTheme()->getId(), $this->httpContext->getValue(Context::CONTEXT_AUTH), $this->getTemplateFile(), 'template' => $this->getTemplate() ]; } /** * Retrieve copyright information * * @return string */ public function getCopyright() { if (!$this->_copyright) { $this->_copyright = $this->_scopeConfig->getValue( 'design/footer/copyright', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } return __($this->_copyright); } /** * Retrieve Miscellaneous HTML information * * @return string * @since 100.1.0 */ public function getMiscellaneousHtml() { if ($this->miscellaneousHtml === null) { $this->miscellaneousHtml = $this->_scopeConfig->getValue( 'design/footer/absolute_footer', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } return $this->miscellaneousHtml; } /** * Return identifiers for produced content * * @return array */ public function getIdentities() { return [\Magento\Store\Model\Store::CACHE_TAG, \Magento\Cms\Model\Block::CACHE_TAG]; } /** * Get block cache life time * * @return int * @since 100.2.4 */ protected function getCacheLifetime() { return parent::getCacheLifetime() ?: 3600; } }