protected function SimpleMegaMenuHtmlRouteProvider::getRevisionRoute in Simple Mega Menu 8
Same name and namespace in other branches
- 2.0.x src/SimpleMegaMenuHtmlRouteProvider.php \Drupal\simple_megamenu\SimpleMegaMenuHtmlRouteProvider::getRevisionRoute()
Gets the revision route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
1 call to SimpleMegaMenuHtmlRouteProvider::getRevisionRoute()
- SimpleMegaMenuHtmlRouteProvider::getRoutes in src/
SimpleMegaMenuHtmlRouteProvider.php - Provides routes for entities.
File
- src/
SimpleMegaMenuHtmlRouteProvider.php, line 114
Class
- SimpleMegaMenuHtmlRouteProvider
- Provides routes for Simple mega menu entities.
Namespace
Drupal\simple_megamenuCode
protected function getRevisionRoute(EntityTypeInterface $entity_type) {
if ($entity_type
->hasLinkTemplate('revision')) {
$route = new Route($entity_type
->getLinkTemplate('revision'));
$route
->setDefaults([
'_controller' => '\\Drupal\\simple_megamenu\\Controller\\SimpleMegaMenuController::revisionShow',
'_title_callback' => '\\Drupal\\simple_megamenu\\Controller\\SimpleMegaMenuController::revisionPageTitle',
])
->setRequirement('_permission', 'access simple mega menu revisions')
->setOption('_admin_route', TRUE);
return $route;
}
}