$this->moduleHandler =
$module_handler;
} /**
* {@inheritdoc}
*/
protected function alterRoutes(RouteCollection
$collection) { foreach ($collection as $name =>
$route) { if ($route->
hasRequirement('_module_dependencies'
)) { $modules =
$route->
getRequirement('_module_dependencies'
);
$explode_and =
$this->
explodeString($modules, '+'
);
if (count($explode_and) > 1
) { foreach ($explode_and as $module) { // If any moduleExists() call returns FALSE, remove the route and
// move on to the next.
if (!
$this->moduleHandler->
moduleExists($module)) { $collection->
remove($name);
continue 2;
} } } else {