protected function RouteSubscriber::setBundleAsTitle in Lightning Core 8.3
Same name and namespace in other branches
- 8.5 src/Routing/RouteSubscriber.php \Drupal\lightning_core\Routing\RouteSubscriber::setBundleAsTitle()
- 8 src/Routing/RouteSubscriber.php \Drupal\lightning_core\Routing\RouteSubscriber::setBundleAsTitle()
- 8.2 src/Routing/RouteSubscriber.php \Drupal\lightning_core\Routing\RouteSubscriber::setBundleAsTitle()
- 8.4 src/Routing/RouteSubscriber.php \Drupal\lightning_core\Routing\RouteSubscriber::setBundleAsTitle()
Sets FieldUiTitleController::bundle() as the title callback for a route.
Parameters
string $route_name: The route name.
\Symfony\Component\Routing\RouteCollection $collection: The complete route collection containing the route to alter.
1 call to RouteSubscriber::setBundleAsTitle()
- RouteSubscriber::alterRoutes in src/
Routing/ RouteSubscriber.php - Alters existing routes for a specific collection.
File
- src/
Routing/ RouteSubscriber.php, line 90
Class
- RouteSubscriber
- Dynamically alters various routes.
Namespace
Drupal\lightning_core\RoutingCode
protected function setBundleAsTitle($route_name, RouteCollection $collection) {
$route = $collection
->get($route_name);
if ($route) {
$route
->setDefault('_title_callback', FieldUiTitleController::class . '::bundle');
}
}