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; } }