CRM Membership
The CRM Membership module provides a flexible framework for managing memberships in Drupal. It allows the creation and management of different types of memberships with configurable terms, durations, and renewal logic.
The module integrates with the CRM module and provides entities and plugins for handling membership lifecycle management.
Key features
- Contact-based memberships — Memberships are tied to CRM Contact entities (contacts as members, target contact as "member of").
- Flexible term management — Different term calculation strategies via pluggable Membership Term plugins (fixed, rolling, lifetime).
- Lifecycle workflows — Activation, renewal, expiration, and cancellation via term plugin methods, forms, and cron (not Symfony events).
- Extensible architecture — Customize via custom plugins, alter hooks, and the IS_MEMBER event subscriber.
Status field vs plugin activity
Memberships store a status field (active, future, expired). MembershipService queries status = active before delegating to term plugins for live period checks. See Status and periods.
Documentation
| Section | Description |
|---|---|
| Getting started | Requirements, installation, and admin UI paths. |
| Architecture | Design: entities, plugins, service, events, queue. |
| Status and periods | Status values, current_periods, grace period. |
| Plugin system | Membership Term plugins: built-in types and custom plugins. |
| Plugin configuration | Per-plugin config keys (duration, grace, rollover). |
| Forms and workflows | Add, edit, renew, and type configuration forms. |
| Services & API | MembershipService, events, programmatic examples. |
| Access control | Permissions and operation matrix. |
| Configuration | Config schema and module settings (planned). |
| Development | Cron, queue worker, testing, and roadmap. |
| Roadmap | Known limitations and planned work. |
| Integration | Views, routes, and membership periods UI. |
For developers
- Entities: Membership, Membership Type, Membership Period.
- API: Inject
crm_membership.serviceforisMember(),getMemberships(),getMembershipsForTarget(). See Programmatic examples. - Extend: Implement a custom Membership Term plugin, use hook_crm_membership_term_info, or subscribe to the IS_MEMBER event.