views_fields ECA model¶
Source: eca.eca.views_fields.yml
Purpose: Computed / rendered fields exposed to Views — the FedMS listing pages depend on these to render edit links, member operations, and event/session-specific actions inline.
Events the model listens to¶
| Plugin | Label |
|---|---|
eca_render:views_field |
Edit event |
eca_render:views_field |
Edit session |
eca_render:views_field |
Views field: group member ops |
Entities & contexts touched¶
fedms_event,fedms_session(the "Edit" actions)group_relationship(group member ops)- Indirectly:
group,user
Why it exists¶
ECA's eca_render:views_field lets the model compute a Views
field at render time instead of needing a custom Views handler in
PHP. Each entry above produces a single row-level cell in the
relevant view:
- Edit event / Edit session — context-sensitive edit links shown only to users with permission, optionally redirecting back to the listing.
- Views field: group member ops — the per-row operations cell on
the group members views (
views.view.group_members,views.view.group_memberships).
Editing notes / gotchas¶
- Adding a new computed Views field means: declare it in the View
config (
views.view.*.yml), then add a matchingeca_render:views_fieldevent here. Keep the two in sync. - The
group member opsfield is permission-sensitive. The links it emits must align with the access rules in group_members. - Don't put heavy computation in render-time hooks. If the cell needs anything that involves multiple queries, pre-compute it in a hook earlier in the request lifecycle.
See also¶
- group_members — the access/permission story for the operations cell rendered here.
- milestone_views — sibling model that handles full-row rendering for the milestone-related views.