Part of #2285413: [Meta] Standardize entity route names, which is part of #2259445: Entity Resource unification
Standardize all taxonomy term entity route names to a standard format, as described below.
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 _).
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.
Comment | File | Size | Author |
---|---|---|---|
#37 | 2291833-taxo-routes-37.patch | 14.61 KB | andypost |
#37 | interdiff.txt | 3.84 KB | andypost |
#36 | 2291833-taxo-routes-36.patch | 14.53 KB | andypost |
Comments
Comment #1
Crell CreditAttribution: Crell commentedComment #2
kgoel CreditAttribution: kgoel commentedComment #4
kgoel CreditAttribution: kgoel commentedComment #6
kgoel CreditAttribution: kgoel commentedComment #7
Crell CreditAttribution: Crell commentedThat's everything but canonical. Now for the hard one. :-)
Comment #8
kgoel CreditAttribution: kgoel commentedCanonical currently is -
I don't think canonical needs to be change unless I am missing something.
Comment #9
Crell CreditAttribution: Crell commentedIt would be taxonomy_term.page, I believe. That's what the yet-to-be-written auto-generating logic would use. (Or whatever the machine name of taxonomy terms is.)
Comment #10
kgoel CreditAttribution: kgoel commentedComment #11
kgoel CreditAttribution: kgoel commentedComment #12
Crell CreditAttribution: Crell commentedNeeds update for "canonical".
Comment #13
Crell CreditAttribution: Crell commentedComment #14
andypostSuppose proper approach.
Vocabulary 'add-form' link was broken, and added to Term new one
PS: no interdiff, because previous patch was mostly wrong
Comment #15
andypostHere the admin form for terms is overview, imo that's fine
Comment #17
andypostadd-form for Term needs vocabulary, so
taxonomy_term_page()
can't use the routeComment #19
andypostlast place, reformatted code
Comment #20
Crell CreditAttribution: Crell commentedThe admin-form link should match the vocabulary's edit-form link for now. That was noted in the upper issues somewhere but didn't propagate out to the individuals, sorry. We can remove admin-form in #2309187: Fix double-link-entry between Entity and Entity Type classes.
Comment #21
Crell CreditAttribution: Crell commentedComment #22
penyaskitoI guess that means it needs work.
Comment #23
andypostmakes sense, this route is bound to vocabulary
Comment #24
andypostotoh this route could be named
entity.taxonomy_vocabulary.canonical
Comment #25
dawehner-1 for those changes, it is just much harder to review with --color-words!! Well, it already happened
As we you said, in this case this method should be moved to the Vocabulary which then though conflicts with the field_ui local tasks
Comment #26
andypost#25.2 - this would be moved to own annotation key in #2309187: Fix double-link-entry between Entity and Entity Type classes
Comment #27
dawehnerOkay, but please don't do that wrapping the future, if it is avoidable.
Comment #29
andypostre-roll
Comment #30
dawehnerre-rtbc
Comment #31
alexpottThe only link we're not changing is reset and there is no mention of why anywhere in the issue.
This is not the same thing at all. This has broken the operations on VocabularyListBuilder since with this patch add terms now goes to the add vocabulary page :)
Let's make the action link names match.
Let's make the contextual link names match the route.
Comment #32
andypost1) Converted to "reset-form" for consistency with other forms, also added test to ensure that after reset user is back to overview form
2) reverted, missed this... when we back to link templates it would be a bit clear then term route lives in vocabulary
3) fixed
4) fixed
Comment #35
penyaskitoI wanted to RTBC this, but does not apply anymore.
Comment #36
andypoststill questional
Comment #37
andypostSuppose this name fits better
Comment #38
Crell CreditAttribution: Crell commentedThen let's RTBC it. :-)
Comment #39
alexpottCommitted 92ff387 and pushed to 8.0.x. Thanks!