Commit 45261a4e authored by paulocs's avatar paulocs Committed by paulocs

Issue #3171741 by paulocs, DeSci: Context module: "Menu Reactions" will not...

Issue #3171741 by paulocs, DeSci: Context module: "Menu Reactions" will not work because menu.active_trail has a different menu service provider
parent 3e11da69
......@@ -17,7 +17,7 @@ class ContextServiceProvider extends ServiceProviderBase {
public function alter(ContainerBuilder $container) {
// Override the menu active trail with a new class.
$definition = $container->getDefinition('menu.active_trail');
if (!is_subclass_of($definition, 'Drupal\Core\Menu\MenuActiveTrail') && $definition instanceof MenuActiveTrail) {
if ($definition->getClass() == MenuActiveTrail::class) {
$definition->setClass('Drupal\context\ContextMenuActiveTrail');
$definition->addArgument($container->getDefinition('context.manager'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment