Developer Documentation — mod_bib_stats

Render lifecycle

  1. Joomla loads services/provider.php.
  2. The dispatcher runs and calls StatsHelper::normaliseLayoutParam().
  3. StatsHelper::getStatsData() prepares the $stats contract.
  4. The selected tmpl/*.php layout renders partials from layouts/stats.
  5. CSS is loaded through media/joomla.asset.json when enabled.

$stats data contract

KeyPurpose
idUnique DOM id for the module instance.
ariaLabelAccessible label for the section.
title, text, eyebrowOptional header copy.
itemsNormalised metric rows.
gridResponsive grid settings.
styleInline CSS variables for per-instance layout.

Important PHP functions

FunctionResponsibility
StatsHelper::normaliseLayoutParam()Converts readable layout selection into Joomla layout value.
StatsHelper::getStatsData()Builds the frontend data contract.
StatsHelper::getStatPresetDefaults()Returns preset metric rows for admin insertion.
StatsHelper::getIconSvg()Returns inline SVG icon markup.
StatpresetField::getInput()Renders preset buttons and injects admin JS options.

Override strategy

Override tmpl/*.php for large layout changes. Override layouts/stats/*.php for targeted markup changes.

Language strategy

The package ships with English only. Add other languages later as regular Joomla language packs or overrides.