rsvp-system/rsvp-system-module
最新稳定版本:v1.0.146
Composer 安装命令:
composer require rsvp-system/rsvp-system-module
包简介
Core Drupal module for the RSVP System. Implements hooks that must live in a module (not a theme), including Views query filters for the calendar event view.
README 文档
README
A Drupal module implementing the server-side hooks for the RSVP System — a recipe-based platform for building calendar and reservation sites with Drupal.
Drupal: ^10.3 || ^11.0
PHP: ^8.3
Part of: RSVP System
Why This Module Exists
Drupal's ModuleHandler::invokeAll() does not invoke theme implementations of
hooks like hook_views_query_alter or hook_views_post_render. Any hook that
must run as part of the server-side request lifecycle — rather than at theme
render time — requires a dedicated module. This module provides those hooks for
the RSVP System.
What It Does
Calendar Views Filtering
hook_views_query_alter injects month-range and community filters into two
Views:
rsvp_event_calendar— Filters one-offrsvp_eventnodes (Smart Date Unix timestamps) to the current calendar month and community. Applies the ADR-0015 owner-OR-audience community model.rsvp_recurring_events_block— Filterseventinstanceentities (ISO datetime strings) to the current month. Community filtering JOINs through the parent EventSeries, becausedrupal/field_inheritancepropagates community fields at display time only and does not write them to the EventInstance database tables.
FullCalendar Month Lock
hook_views_pre_render sets FullCalendar's initialDate and validRange
options dynamically so the calendar renders at the correct month for the current
page, rather than defaulting to today's date.
Unified Calendar Display — Recurring Events Injection
hook_views_post_render injects EventInstance events from
drupal/recurring_events into the same FullCalendar grid as rsvp_event
nodes, without a SQL UNION. The FullCalendar style plugin stores its event data
in drupalSettings inside the render array's #rows key. This hook appends a
second event source array in PHP before the render array reaches the browser.
FullCalendar.js merges all sources onto the same grid.
EventInstances receive the fc-recurring-event CSS class for visual
distinction. Community filtering uses the same EventSeries JOIN pattern as
the query alter hook.
Pathauto Support for Recurring Events Entities
hook_entity_base_field_info adds the path base field to both eventseries
and eventinstance entity types. drupal/recurring_events:^3.0 does not
implement path aliasing natively; this hook is what enables Pathauto to generate
URL aliases for recurring events entities.
Submodule: rsvp_reservation_widget
An AJAX cascading form widget for the rsvp_reservation node form.
Replaces the raw entity reference widgets for community and resource fields with
a two-step UX: a community selector (defaulting to the user's primary community)
followed by a resource selector filtered to that community. Resource options come
from the rsvp_resources_by_community View. Values are written back to the
underlying fields via #element_validate.
Enable separately:
vendor/bin/drush en rsvp_reservation_widget
Installation
This module is included automatically when a site requires the RSVP System requirements metapackage:
composer require rsvp-system/rsvp-requirements
vendor/bin/drush en rsvp_system_module
Or install directly:
composer require rsvp-system/rsvp-system-module
vendor/bin/drush en rsvp_system_module
No additional configuration is required. Hooks fire automatically when the
target Views (rsvp_event_calendar, rsvp_recurring_events_block) are present.
Dependencies
This module depends on:
drupal:viewsdrupal:node
The rsvp_reservation_widget submodule additionally requires:
drupal:taxonomy
Contrib module dependencies (drupal/recurring_events, drupal/field_inheritance,
drupal/fullcalendar, drupal/smart_date, drupal/pathauto) are pulled in via
the rsvp-system/rsvp-requirements metapackage.
Related Packages
| Package | Purpose |
|---|---|
rsvp-system/rsvp-requirements | Composer metapackage — all contrib dependencies + this module |
rsvp-system/rsvp-recipes | Drupal recipes — config for calendar, events, reservations, communities |
rsvp-system/rsvp-system-theme | Tailwind-based frontend theme |
License
GPL-2.0-or-later. See LICENSE.
统计信息
- 总下载量: 121
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-02-26