protected function DataPolicyHtmlRouteProvider::getRevisionEditRoute in Data Policy 8
Gets the revision edit 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 DataPolicyHtmlRouteProvider::getRevisionEditRoute()
- DataPolicyHtmlRouteProvider::getRoutes in src/
DataPolicyHtmlRouteProvider.php - Provides routes for entities.
File
- src/
DataPolicyHtmlRouteProvider.php, line 112
Class
- DataPolicyHtmlRouteProvider
- Provides routes for Data policy entities.
Namespace
Drupal\data_policyCode
protected function getRevisionEditRoute(EntityTypeInterface $entity_type) {
if (!$entity_type
->hasLinkTemplate('revision_edit')) {
return NULL;
}
$route = new Route($entity_type
->getLinkTemplate('revision_edit'));
$route
->setDefaults([
'_form' => '\\Drupal\\data_policy\\Form\\DataPolicyRevisionEdit',
'_title' => 'Edit revision',
])
->setRequirement('_custom_access', '\\Drupal\\data_policy\\Controller\\DataPolicy::revisionEditAccess')
->setOption('_admin_route', TRUE);
return $route;
}