Build rsvp_qr sub-module and companion recipe

Submitted by StephenGroundwater on
Status
Priority
High

Implement QR code generation per ADR-0027. A composable sub-module providing a stable internal API for QR code generation across events, RSVP, feedback, and resource booking use cases.

Sub-module: rsvp_qr (in rsvp_system_module/modules/)

Services

  • QrCodeService — wraps endroid/qr-code. Methods: svg(), pngDataUri(), generateManagedFile(). All callers go through QrCodeServiceInterface — never endroid directly.

Field Formatter

  • QrCodeFormatter — applies to link, text (plain), and entity reference fields. Formatter settings: size, error_level, output (SVG|PNG), show_url, label. Calls service, returns render array — no file stored for inline display.

Twig Extension

  • rsvp_qr(url, options) — inline SVG
  • rsvp_qr_png(url) — base64 PNG data URI for email/print templates

ECA Action Plugin (optional)

  • GenerateAndAttachQrCode — calls QrCodeService::generateManagedFile(), attaches result to a configurable field on the entity. Used for pre-generating downloadable QR PNGs on event publish.

Companion Recipe: rsvp_qr (in rsvp-recipes)

  • Documents composer require endroid/qr-code as prerequisite
  • Enables rsvp_qr sub-module
  • Applies QrCodeFormatter to rsvp_event full and print view display modes
  • Not included in rsvp_full_stack — opt-in

Definition of Done

  • endroid/qr-code installed via Composer
  • QrCodeService::svg() returns valid inline SVG for any URL input
  • Formatter applied to rsvp_event renders QR code on full display
  • rsvp_qr() Twig function works in templates
  • ECA action plugin exists and is documented (ECA model itself is out of scope for this task)
  • Companion recipe applies cleanly on fresh install

ADR: ADR-0027
Library: endroid/qr-code (evaluate qr_field contrib for D11 compat at start)