Magento 2.3 Topmenu override declaration error
-
06-03-2021 - |
Question
Declaration of _getHtml
Should be compatible with Magento\Theme\Block\Html\Topmenu::_getHtml(Magento\Framework\Data\Tree\Node $menuTree, $childrenWrapClass, $limit, array $colBrakes = Array)
La solution
Ibnab\MegaMenu\Block\Html\Topmega.php
protected function _getHtml(
\Magento\Framework\Data\Tree\Node $menuTree,
$childrenWrapClass,
$limit,
array $colBrakes = []
)
Also replace :
$colStops = null; to $colStops = [];
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange