protected function VocabularyRouteProvider::getCollectionRoute in Drupal 9
Same name and namespace in other branches
- 8 core/modules/taxonomy/src/Entity/Routing/VocabularyRouteProvider.php \Drupal\taxonomy\Entity\Routing\VocabularyRouteProvider::getCollectionRoute()
Gets the collection route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
Overrides DefaultHtmlRouteProvider::getCollectionRoute
File
- core/
modules/ taxonomy/ src/ Entity/ Routing/ VocabularyRouteProvider.php, line 32
Class
Namespace
Drupal\taxonomy\Entity\RoutingCode
protected function getCollectionRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getCollectionRoute($entity_type)) {
$route
->setRequirement('_permission', 'access taxonomy overview+administer taxonomy');
return $route;
}
}