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.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
Type:drupal-module
pkg:composer/rsvp-system/rsvp-system-module
Requires
- php: >=8.3
- drupal/core: ^10.3 || ^11.0
README
Core Drupal module for the RSVP System — a theme and recipe cookbook for building calendar-based CMS sites with Drupal.
Purpose
This module implements Drupal hooks that must live in a module, not a theme. Drupal's ModuleHandler::invokeAll() does not invoke theme implementations of hooks like hook_views_query_alter and hook_views_pre_render.
Current hooks
hook_views_query_alter — Calendar event filtering
Injects two SQL filters into the rsvp_event_calendar Views block:
Month-range filter — restricts events to those starting within the calendar month. The view receives a
YYYY-MM-DDdate string asargs[0](passed from thecalendar_monthnode template viadrupal_view()).Community filter — restricts events to those belonging to the same community as the calendar month page. The community taxonomy term ID is passed as
args[1].
The smart_date Date argument plugin cannot produce month-range queries, so null contextual filters are used in the view and all real filtering is done here.
hook_views_pre_render — FullCalendar initialDate / validRange
Sets initialDate and validRange on the FullCalendar JS options so the calendar widget renders at the correct month rather than defaulting to today.
Installation
composer require rsvp-system/rsvp-system-module
vendor/bin/drush en rsvp_system_module -y
vendor/bin/drush cr
Requirements
- PHP 8.3+
- Drupal 10.3+ or 11.x
drupal/viewsdrupal/nodedrupal/fullcalendar(for the views_pre_render hook to take effect)drupal/smart_date(for the event date field)
Related packages
- rsvp-system/rsvp-system-theme — Tailwind CSS v4 theme
- rsvp-system/rsvp-recipes — Drupal recipe cookbook