Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293902

Standardize node route names by relationship

$
0
0

Part of #2259445: [Meta] Entity Resource unification

Problem/Motivation

Let's make any API changes now for the parent issue so that it doesn't block beta.

Proposed resolution

In order to get the API changes taken care of up-front for the parent issue, we are going to rename all of the entity-related routes to match what they will be once they are auto-generated. That way, once we start auto-generating them we can remove the static ones or not and there's no affect on module developers.

Remaining tasks

Rename all entity HTML routes to match a common format.

The common format is: entity.$entityname.$relationship, where $entityname is the machine name of the entity and $relationship is the relationship as defined in the entity annotation, machine-name-ified. (Convert - to _).

For example, there are five routes defined for in Node's annotation right now: canonical, delete-form, edit-form, version-history, admin-form. Their route names should therefore be entity.node.canonical, entity.node.delete_form, entity.node.edit_form, entity.node.version_history, and entity.node.admin_form, respectively.

This requires a change to the entity annotation, the defined routes, and any generator calls to those routes.

User interface changes

None.

API changes

Many routes will have different names. Otherwise no change.


Viewing all articles
Browse latest Browse all 293902

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>