Entities should provide route and route parameter methods (instead of uri()?)

Created on 13 November 2013, over 11 years ago
Updated 16 February 2025, about 2 months ago

Problem/Motivation

Drupal core is inbetween using paths and routes for things, but moving towards routes and route parameters. Entities are still stuck somewhere between the two with 'route_base_path' and uri() methods, while work is ongoing to change the links to routes instead (see #2133469: Replace path-based entity links with route names β†’ ).

Proposed resolution

Figure out the best way for entities to provide routes and route parameters themselves instead of uri()s directly to match with Drupal 8's route based reality.

Remaining tasks

  • Discuss.
  • Implement.
  • Review.
  • Commit.

User interface changes

None.

API changes

Likely uri() may go away and new methods may be added.

Related Issues

#2133469: Replace path-based entity links with route names β†’

πŸ“Œ Task
Status

Closed: outdated

Version

11.0 πŸ”₯

Component

entity system

Created by

πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024