group_operations ECA model¶
Source: eca.eca.group_operations.yml
Purpose: Wires up per-group operations — what shows in the group's operations menu / VBO actions, what tokens are available in those flows, and a couple of pre-save guarantees on event/session entities.
Events the model listens to¶
| Plugin | Label |
|---|---|
content_entity:presave |
Pre-save event |
content_entity:presave |
Pre-save session |
eca_base:eca_token_generate |
Group context tokens |
Entities & contexts touched¶
group(bundlesevent,session)- ECA token registry (custom
eca_base:eca_token_generate)
Why it exists¶
- Pre-save hooks ensure that when an event or session group is
saved, derived state (e.g.
field_flag_*_processeddefaults, generated label parts) is consistent before persistence. - Token generation exposes the current group context to other ECA models so they can render labels, conditions, and links without duplicating context resolution.
Editing notes / gotchas¶
- Pre-save logic runs on every save — keep conditions tight, otherwise you pay a performance tax on bulk imports.
- Tokens defined here are consumed by
links,group_blocks,milestone_views, and thetask_apitask labels. Renaming a token breaks downstream models silently — search before renaming. - Don't perform writes in pre-save handlers that trigger more save events — you'll create infinite loops.