Changelog
[3.0.0] — in development
The first release of PageBlocks, built on four standard tools instead of home-grown ones: Eloquent for data, Phinx for schema, FastRoute for routing and pbFenom for templates.
Data
- Eloquent models with relations, scopes and casts, resolved by short name through
model(). query()opens an Illuminate query builder over the MODX database, pluswithJsonColumns()for the JSON columns the constructor writes into.- Phinx migrations in two independent layers — the component's own and the site's.
- Constructor fields live in a JSON column and behave like ordinary attributes; no accessors to write.
Routing and requests
- FastRoute-based routing with named routes, groups, middleware and a route cache.
Route::crud()for a whole CRUD set behind one middleware stack, fail-closed.- Own
Request/Response, validation, CSRF protection. - Redirects managed from the manager, stored in
pb_routes.
Templates
- pbFenom, a hardened Fenom fork shipped as a Composer package: no
eval(), bounded recursion, modifiers that acceptnull, strict types throughout. - Five template providers — MODX chunks, files, paths and templates.
Manager
- Constructor for blocks, tables, fields, tabs, columns and menus.
- Reusable blocks with a master copy and per-field sync.
- Versions with restore, and a basket for soft-deleted rows.
- Multilingual content: languages, translators and translations.
- Model constructor — generates models and migrations from the interface.
Integration
- REST API with bearer tokens, scopes, rate limiting, CORS and a self-generated OpenAPI specification.
- Seven MODX snippets so the component is reachable from an ordinary template:
pbList,pbBlocks,pbResources,pbUsers,pbMenu,pbFilters,pbJson. - Front-end JavaScript:
pbFetch,pbForm,pbMessage,pbPagination.
Requirements
MODX 3.0+, PHP 8.2+. The installer enforces both.