Problem/Motivation
Split from #3483304: Add support for disabling a route for a node-type
NodeViewController only contains 2 methods - view and title.
::view delegates immediately to the parent and contains no additional logic.
::title does the effective equivalent of EntityController::title
We can effectively swap to use EntityViewController directly, therefore removing NodeRouteProvider::getCanonicalRoute
In fact, I'm not even sure if NodeViewController::title is used anywhere since NodeRouteprovider doesn't override the default _title_callback
Steps to reproduce
N/A
Proposed resolution
Deprecate NodeViewController entirely
Remove NodeRouteProvider::getCanonicalRoute override
Remaining tasks
User interface changes
None
Introduced terminology
None
API changes
NodeViewController deprecated
Data model changes
None
Release notes snippet
None
Issue fork drupal-3589630
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
acbramley commentedComment #4
acbramley commentedComment #5
larowlanReviewed the change record and the code, this looks good to me
Comment #6
alexpottWe stopped using NodeViewController::title in #2723579: NodeRouteProvider should extend DefaultHtmlRouteProvider
Comment #7
alexpottCommitted and pushed 177e4f8af61 to main and 75b2e715ae7 to 11.x. Thanks!