Allow vocabulary overview form class to be overridden

Created on 16 July 2024, about 2 months ago

Problem/Motivation

This could possibly be classified as a bug report. The entity annotation for the Vocabulary class sets the overview form to Drupal\taxonomy\Form\OverviewTerms. Ideally this can be overridden by calling \Drupal\Core\Entity\EntityType::setFormClass from hook_entity_type_alter, however it has no effect since VocabularyRouteProvider::getOverviewPageRoute hardcodes the form class.

Steps to reproduce

Proposed resolution

Update \Drupal\taxonomy\Entity\Routing\VocabularyRouteProvider::getOverviewPageRoute to call $route->setDefault('_form', $entity_type->getFormClass('overview'));.

Remaining tasks

Test coverage

User interface changes

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
TaxonomyΒ  β†’

Last updated 1 day ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @xjm
  • πŸ‡¬πŸ‡§United Kingdom @catch
Created by

πŸ‡¦πŸ‡ΊAustralia mstrelan

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024