jdz/adminkit
Composer 安装命令:
composer require jdz/adminkit
包简介
Framework-agnostic admin list/item orchestration primitives: pagination, filter-state resolution, ordering validation, query building, uniqueness and data sanitization
README 文档
README
Framework-agnostic primitives for building admin list/edit screens. No HTTP, session, view or ORM coupling — you feed each helper plain values from whatever framework you run (Slim, Symfony, …) and get back a computed result.
Built on jdz/database (query building)
and jdz/form (form data).
What's in the box
| Class | Purpose |
|---|---|
List\Paginator |
Clamp a requested page against a total and derive the SQL offset |
List\FilterStateResolver |
Merge defaults < stored < request < forced filter state; inject token/page/ordering |
List\OrderingValidator |
Decide whether drag-and-drop reordering is allowed for the current list |
List\SearchTerm |
Split a CODE:text search string |
Query\AdminQuery |
SelectQuery with category / version / keyword select+filter helpers |
Item\UniquenessChecker |
"is this column value already taken" against a DatabaseInterface |
Item\DataSanitizer |
Coerce posted form values to match their column definitions before save |
Example
use JDZ\AdminKit\List\Paginator; $p = new Paginator(total: 128, page: 3, limit: 20); $p->start; // 40 (SQL offset) $p->nbPages; // 7 $p->page; // 3 (clamped if out of range)
Scope
Orchestration only — data access, HTTP, view rendering and the admin UI value
objects (jdz/adminui) stay in the
consuming framework. Row assembly and view-payload building are intentionally
NOT part of this package: they are tightly coupled to per-app rendering hooks
and belong with the consumer.
Tests
composer test
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-09