Skip to content
Snippets Groups Projects

Issue #3486949: Add getMenus() method to support subclassing

1 file
+ 11
1
Compare changes
  • Side-by-side
  • Inline
@@ -205,7 +205,7 @@ class MenuBasedBreadcrumbBuilder implements BreadcrumbBuilderInterface {
// Check each selected menu, in turn, until a menu or taxonomy match found:
// then cache its state for building & caching in build() and exit.
$menus = $this->config->get('menu_breadcrumb_menus');
$menus = $this->getMenus();
uasort($menus, function ($a, $b) {
return SortArray::sortByWeightElement($a, $b);
});
@@ -437,6 +437,16 @@ class MenuBasedBreadcrumbBuilder implements BreadcrumbBuilderInterface {
}
}
/**
* Retrieve menus from configuration.
*
* @return array
* Configuration menus.
*/
protected function getMenus(): array {
return $this->config->get('menu_breadcrumb_menus') ?: [];
}
/**
* The getter function for $menuName property.
*
Loading