starcitizentools/ag-grid
Composer 安装命令:
composer require starcitizentools/ag-grid
包简介
Renders AG Grid data grids in MediaWiki
README 文档
README
Build sortable, filterable AG Grid data tables on wiki pages, straight from Lua. Put clickable links and thumbnails inside cells, page through large datasets, and query rows from Semantic MediaWiki or Bucket.
✨ Highlights
- Interactive tables on wiki pages — readers sort, filter, search, and page through the data in place, instead of scrolling a static wikitable.
- Scales to large datasets — page through thousands of rows, or query them on the server so the page stays light.
- Shows your structured data — turn Semantic MediaWiki or Bucket data into a live table, sorted, filtered, and paged on the server.
- Rich cells — clickable page links and thumbnails inside cells, resolved server-side.
- Authored in Lua — define grids in a Scribunto module; no hand-built HTML or JavaScript.
- Fits your wiki — matches the active skin's light/dark colours automatically, and extends from JavaScript when you need a custom renderer or filter.
📋 Requirements
- MediaWiki 1.43 or later
- Scribunto
📦 Installation
-
Drop the extension in
extensions/AGGridand load it fromLocalSettings.php:wfLoadExtension( 'AGGrid' );
-
Run the database updater to create the extension's tables (
aggrid_data,aggrid_source):php maintenance/run.php update
Grids will not render until these tables exist.
⚙️ Configuration
All settings are optional.
| Setting | Default | Description |
|---|---|---|
$wgAGGridCacheControl |
{ "inline": { "maxAge": 86400, "staleWhileRevalidate": 604800 }, "default": { "maxAge": 600 } } |
Per-source cache policy for grid REST responses. inline is the content-addressed materialized /rows path (maxAge is a revalidation cadence, not a staleness ceiling). default is the fallback for backend sources (a hard staleness ceiling — no purge when the underlying data changes); override per source with its id, e.g. "smw" / "bucket". |
$wgAGGridBucketMaxValues |
1000 |
Maximum rows scanned when listing a Bucket column's set-filter values; the list is marked partial when reached. |
🚀 Quick start
Pass a gridOptions table to render:
mw.ext.aggrid.render{ columnDefs = { { field = 'name', headerName = 'Name' }, { field = 'price', headerName = 'Price', filter = 'agNumberColumnFilter' }, }, rowData = { { name = 'Aurora', price = 25 }, { name = 'Mustang', price = 30 }, }, pagination = true, }
gridOptions mirrors AG Grid's
gridOptions object one to one, so
anything JSON-serialisable from their docs works here. See
Authoring grids for the full picture.
🔀 Two ways to supply data
- Inline — supply
columnDefsandrowDatadirectly, as above. Best for small, hand-written or Lua-generated tables. → Authoring grids - Backend source — supply a
sourcedescriptor and the rows come from Semantic MediaWiki or Bucket, queried and paged on the server. Best for large or already-stored datasets. → Backend source grids
📚 Documentation
| Guide | What it covers |
|---|---|
| Authoring grids | The inline gridOptions model, the no-functions limit, pagination, theming, limits |
| Rich cells | Links, thumbnails, linked thumbnails, and link lists |
| Formatting | format specs for numbers and dates |
| Filters | The aggridSet set filter and the quick-search box |
| Backend source grids | Querying rows from Semantic MediaWiki and Bucket |
| Extending with JavaScript | Custom column types, renderers, filters, and the grid API |
🔎 See also
⚖️ License
GPL-3.0-or-later. Bundles AG Grid Community (MIT); see modules/lib/ag-grid-community/LICENSE.txt.
starcitizentools/ag-grid 适用场景与选型建议
starcitizentools/ag-grid 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 36 次下载、GitHub Stars 达 4, 最近一次更新时间为 2026 年 06 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「extension」 「mediawiki」 「aggrid」 「ag grid」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 starcitizentools/ag-grid 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 starcitizentools/ag-grid 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 starcitizentools/ag-grid 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
An extension to Semantic MediaWiki allowing to build breadcrumb links from an attributive property filter
A custom URL rule class for Yii 2 which allows to create translated URL rules
Helper functions for the MediaWiki ExtensionRegistry
Adds the EDTF data type to Wikibase
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 35
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2026-06-03