Skip to content

Repository files navigation

LindemannRock Plugin Base

Latest Version Craft CMS PHP License

Common utilities and building blocks for LindemannRock Craft CMS plugins.

Features

  • Edition Support — standardized Standard/Pro edition support for the Plugin Store
  • Settings Traits — database persistence, config file overrides, custom display names
  • DateFormatHelper — centralized date/time formatting with timezone-aware SQL expressions
  • DateRangeHelper — standardized date range selection, bounds, and query filtering
  • ColorHelper — 18-color palette and 16 built-in color sets for consistent styling
  • PluginThemeStyleHelper — icon-derived CSS variables for branded plugin heroes and docs surfaces
  • QrCodeRendererHelper — Craft-driver-aware Bacon QR Code PNG rendering with Imagick and full solid-style GD support
  • Disposable Cache Storage — capability-driven file/application-cache resolution and shared effective-state presentation
  • ScopedCache — backend-neutral finite-TTL values with generation-based family and scope invalidation
  • ExportHelper — CSV, JSON, and Excel export with configurable format availability
  • GeoHelper — ISO 3166-1 country lookups, dial codes, and phone validation
  • DbHelper — DB-agnostic JSON extraction, GROUP_CONCAT, text casting, and upsert existing-row references
  • GqlHelper — schema permission checks and site argument resolution for plugin-owned GraphQL queries
  • YiiRedisConnectionHelper — independently owned, non-persistent Yii Redis connections from Craft-compatible configuration
  • Redis Database Diagnostics — bounded, read-only point-in-time key counts for Craft's configured Redis-cache endpoint
  • PortableQueueScheduler — long-delay Craft queue scheduling with bounded SQS handoffs and preserved absolute targets
  • BooleanHelper — normalize boolean-like config, env, style, and valueless HTML attribute values
  • ExperimentalFeatureHelper — env-flag gating for internal or launch-deferred features
  • CsvImportHelper — CSV upload parsing with configurable options
  • CpNavHelper — CP subnav building with permission checks
  • LabelHelper — strip numbering and truncate long field labels for compact UI contexts (|lrShortLabel Twig filter)
  • Device Detection — standardized UA parsing via Matomo DeviceDetector
  • GeoLookup — IP geolocation via configurable providers (ip-api.com, ipapi.co, ipinfo.io)
  • CP Table Layout — reusable table pages with filters, search, pagination, and AJAX refresh
  • CP Analytics Layout — analytics dashboards with tabs, charts, stat boxes, and date filters
  • Twig Extensions — 30+ filters and functions for dates, colors, plugin theme styles, exports, geo, and plugin detection
  • 27 Twig Components — badge, cache-storage status, stat-box, dashboard-widget helpers, info-box, export-menu, row-actions, filters, and more
  • Testing UtilitiesIntegrationTestCase abstract base with component swap/restore, generic DB helpers, marker cleanup, fixture lifecycle helpers for elements/temp paths, queue drain, and an external-state cleanup hook; a SqlDialectLinter that flags PostgreSQL-unsafe raw SQL from MySQL-only CI; plus a bootstrap() function and phpunit.xml.dist template for quick test-suite setup in consumer plugins

Requirements

  • PHP 8.2+
  • Craft CMS 5.10+

Installation

composer require lindemannrock/craft-plugin-base

Documentation

Full documentation is available in the docs folder.

Support

License

This plugin is licensed under the MIT License. See LICENSE.md for details.


Developed by LindemannRock

About

Common utilities and building blocks for LindemannRock Craft CMS plugins - traits, helpers, Twig extensions, and shared templates

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages