cancel
Showing results for 
Search instead for 
Did you mean: 

Overriding Topmenu block

Overriding Topmenu block

Hi,

so I tried to override the block Topmenu.php, but when I try to define a new _getHtml() method, i get an error that says that the methods don't have the same parameters.

 

So the question is, if I am trying to override a method that uses a type like 

use Magento\Framework\Data\Tree\Node;

how do I do it in the new block that overrides the old one?

 

Best regards

Yuan