How to How to override footer block Magento\Theme\Block\Html Current block is


namespace Magento\Theme\Block\Html;

use Magento\Customer\Model\Context;

class Footer extends \Magento\Framework\View\Element\Template implements 
   protected function getCacheLifetime()
     //return parent::getCacheLifetime() ?: 3600;
       return null;

1 Answer 1


Can u please explain what you want to override in that footer block ??,

As I have understood from your question -

if you want to change the file method's return type or arguments, please go by creating plugins for that class or preferences.

Or you can use the layout XML file in your module or theme by creating with the same name to over-ride that XML file and change the block class to your custom class location in the Block/Footer.php file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.