links ECA model¶
Source: eca.eca.links.yml
Purpose: Alters rendered links so that group-context information (parent org/event/session) is preserved and FedMS-specific link variants appear in the right places.
Events the model listens to¶
| Plugin | Label |
|---|---|
eca_render:alter_link |
ECA alter link |
A single-event model with fan-out via conditions — all variations of link alteration happen inside this one event's action chain.
Entities & contexts touched¶
- Any rendered
Linkelement passed througheca_render:alter_link. - Group context (consumed via tokens emitted by group_operations).
Why it exists¶
Drupal's link rendering is centralized. Rather than scatter
hook_link_alter()-style code across modules, FedMS funnels link
adjustments through this single model so the rules stay declarative
and inspectable.
Typical concerns it handles:
- Adding
?destination=to keep users in their group context after an edit. - Switching between admin and front-end variants of the same link based on the active theme.
- Hiding or relabelling links based on group-membership state.
Editing notes / gotchas¶
- This is a single-event model with fan-out via conditions. Add
new rules by adding new condition + action branches inside the
existing
eca_render:alter_linkevent, not by adding new top-level events. - The model has no
conditions:orgateways:sections in the YAML (they are empty), which means link decisions live entirely in the action chain. Keep that in mind when extending. - Keep the action chain ordered. Later actions can override earlier ones — make sure the precedence is what you want.
Related issues¶
fedms/support#16— Stay on the event after content actions (the destination-param case).
See also¶
- group_operations — supplies the tokens this model uses.