Commit f3c0bc05 authored by alexpott's avatar alexpott

Issue #2322933 by Xano: Fixed Module list form fatals due to incorrect route configuration.

parent 723af4bc
......@@ -288,6 +288,7 @@ protected function buildRow(array $modules, Extension $module, $distribution) {
$request->attributes->set('_route_name', $module->info['configure']);
$route_object = $this->routeProvider->getRouteByName($module->info['configure']);
$request->attributes->set('_route', $route_object);
$request->attributes->add($route_parameters);
$description = $this->titleResolver->getTitle($request, $route_object);
}
......
......@@ -38,6 +38,6 @@ public function testModuleListForm() {
$this->assertResponse('200');
// Check that system_test's configure link was rendered correctly.
$this->assertLinkByHref('configure/bar');
$this->assertFieldByXPath("//a[contains(@href, '/system-test/configure/bar') and @title='Bar.bar']");
}
}
......@@ -91,4 +91,16 @@ public function shutdownFunctions($arg1, $arg2) {
}
}
/**
* Returns the title for system_test.info.yml's configure route.
*
* @param string $foo
* Any string for the {foo} slug.
*
* @return string
*/
public function configureTitle($foo) {
return 'Bar.' . $foo;
}
}
......@@ -75,5 +75,7 @@ system_test.shutdown_functions:
system_test.configure:
path: '/system-test/configure/{foo}'
defaults:
_title_callback: '\Drupal\system_test\Controller\SystemTestController::configureTitle'
requirements:
_access: 'TRUE'
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