Chris@14: getResetPageRoute($entity_type)) { Chris@14: $collection->add("entity.taxonomy_vocabulary.reset_form", $reset_page_route); Chris@14: } Chris@14: Chris@14: if ($overview_page_route = $this->getOverviewPageRoute($entity_type)) { Chris@14: $collection->add("entity.taxonomy_vocabulary.overview_form", $overview_page_route); Chris@14: } Chris@14: Chris@14: return $collection; Chris@14: } Chris@14: Chris@14: /** Chris@14: * {@inheritdoc} Chris@14: */ Chris@14: protected function getCollectionRoute(EntityTypeInterface $entity_type) { Chris@14: if ($route = parent::getCollectionRoute($entity_type)) { Chris@14: $route->setRequirement('_permission', 'access taxonomy overview+administer taxonomy'); Chris@14: return $route; Chris@14: } Chris@14: } Chris@14: Chris@14: /** Chris@14: * Gets the reset page route. Chris@14: * Chris@14: * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type Chris@14: * The entity type. Chris@14: * Chris@14: * @return \Symfony\Component\Routing\Route|null Chris@14: * The generated route, if available. Chris@14: */ Chris@14: protected function getResetPageRoute(EntityTypeInterface $entity_type) { Chris@14: $route = new Route('/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/reset'); Chris@14: $route->setDefault('_entity_form', 'taxonomy_vocabulary.reset'); Chris@14: $route->setDefault('_title', 'Reset'); Chris@14: $route->setRequirement('_permission', $entity_type->getAdminPermission()); Chris@14: $route->setOption('_admin_route', TRUE); Chris@14: Chris@14: return $route; Chris@14: } Chris@14: Chris@14: /** Chris@14: * Gets the overview page route. Chris@14: * Chris@14: * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type Chris@14: * The entity type. Chris@14: * Chris@14: * @return \Symfony\Component\Routing\Route|null Chris@14: * The generated route, if available. Chris@14: */ Chris@14: protected function getOverviewPageRoute(EntityTypeInterface $entity_type) { Chris@14: $route = new Route('/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview'); Chris@14: $route->setDefault('_title_callback', 'Drupal\taxonomy\Controller\TaxonomyController::vocabularyTitle'); Chris@14: $route->setDefault('_form', 'Drupal\taxonomy\Form\OverviewTerms'); Chris@14: $route->setRequirement('_entity_access', 'taxonomy_vocabulary.access taxonomy overview'); Chris@14: $route->setOption('_admin_route', TRUE); Chris@14: Chris@14: return $route; Chris@14: } Chris@14: Chris@14: }