Developer Documentation — mod_bib_stats
Render lifecycle
- Joomla loads
services/provider.php. - The dispatcher runs and calls
StatsHelper::normaliseLayoutParam(). StatsHelper::getStatsData()prepares the$statscontract.- The selected
tmpl/*.phplayout renders partials fromlayouts/stats. - CSS is loaded through
media/joomla.asset.jsonwhen enabled.
$stats data contract
| Key | Purpose |
|---|---|
id | Unique DOM id for the module instance. |
ariaLabel | Accessible label for the section. |
title, text, eyebrow | Optional header copy. |
items | Normalised metric rows. |
grid | Responsive grid settings. |
style | Inline CSS variables for per-instance layout. |
Important PHP functions
| Function | Responsibility |
|---|---|
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.