Problem/Motivation
Moderation states and moderation state transitions manually declare their routes instead of using the default route provider. This leads to code duplication and divergence.
Proposed resolution
Use the default route provider for moderation states and moderation state transitions.
As part of this, the following things are fixed, as well:
- Fixes case of local actions from
Add Moderation state(| transition)
toAdd moderation state(| transition)
. This is to make it consistent with the page titles of the resulting pages after clicking the action links. - Adds an administrative permission to moderation states. This allows the collection route to be auto-generated.
- Adds an
add-form
link to moderation states and moderation state transitions. This allows the add form route to be auto-generated. - Updates the
edit-form
link for moderation states and moderation state transitions to match the path used previously in the route. - Updates the moderation state access control handler to make use of its parent class. The introduction of an administrative permission (see above) makes some of the code redundant, so that is fixed.
Remaining tasks
Review patch.
User interface changes
The page title of the workflow state collection and workflow state transition collection are changed to Workflow state entities
and Workflow state transition entities
, respectively. While being a regression in clarity (and, thus, usability) this will be fixed by #2767025: Add entity type label for a collection of entities. Our current entity API is not capable of providing a better label for this, yet. Since this is an experimental module, that is an acceptable trade-off. If this ends up hindering the removal of the module's experimental state we can always extend the default route provider to provide a better label.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2802301-7-content-mod-route-provider.patch | 9.97 KB | tstoeckler |
Comments
Comment #2
tstoecklerComment #3
dawehnerSuper nice improvement!
Comment #4
tstoecklerComment #5
tstoecklerOops, didn't mean to do that.
Comment #7
tstoecklerThis should be green.
The edit-form link template was incorrect, so the UI worked, but with a different path...
Comment #8
timmillwoodMoving back to RTBC
Comment #9
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedLooks great!
Comment #10
alexpottCommitted and pushed aef08f5 to 8.3.x and 4f69503 to 8.2.x. Thanks!
RC eligible because this is for an experimental module.