Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Updated: Comment #0
Problem/Motivation
We still have 2 @todo's in FieldInstanceMapper. Thanks to #2111823: Convert field_ui / Entity local tasks to YAML definitions I just found out about EntityManager::getRouteInfo().
Proposed resolution
We can use that to figure out the route parameters for the base route for field instances. That removes the two @todo's.
Remaining tasks
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2139209-5.patch | 1.15 KB | tstoeckler |
Comments
Comment #1
tstoecklerComment #2
tstoecklerMeh, we need the parent entity, of course. Hmm...
Comment #3
Gábor HojtsyFYI the same code is being updated in #2111823: Convert field_ui / Entity local tasks to YAML definitions "similarly":
Comment #4
tstoecklerYeah, I saw that too. At this point, since that is pretty much done, we should postpone this on that. I still think using getRouteInfo() makes more sense than specifying the $bundle argument ourselves, but I don't want to set that patch back to needs review for that, since it's already an improvement the way it is.
Comment #5
tstoecklerYeah, so I had the right feel for that.
Here's a re-roll now that that is in.
Also uses the correct parameters now, I hope.
Comment #7
tstoecklerWTF, mate?
Comment #8
tstoeckler5: 2139209-5.patch queued for re-testing.
Comment #10
tstoecklerComment #17
BerdirThe code is now in \Drupal\config_translation\ConfigFieldMapper::getBaseRouteParameters() I think and the @todo is gone, not sure if this is still relevant but that getAdminRouteInfo() method doesn't seem to exist, so closing as outdated, feel free to re-open ;)