CookieBanner Module

Purpose

Renders a configurable cookie-consent banner for privacy compliance UX.

Enablement Key

  • Module metadata slug: cookiebanner
  • Enabled flag defaults to false in module metadata.

Key Features

  • Configurable cookie name and duration
  • Configurable message, read-more URL, and button label
  • Inline style configuration for banner and button
  • Render method that hides banner once consent cookie exists

Routing and Integration

  • This module does not expose a routes.php file in current structure.
  • Integration is done by instantiating the CookieBanner class and echoing render output in a theme/layout.

Important Files

  • public_html/modules/cookiebanner/CookieBanner.php
  • public_html/modules/cookiebanner/config.php
  • public_html/modules/cookiebanner/index.php
  • public_html/modules/cookiebanner/readme.md

Notes

  • Namespace casing in implementation is App\Modules\cookiebanner; keep class loading consistent with project autoload rules.
  • Consider centralizing style output into CSS classes instead of inline style strings for maintainability.