This was the whitepaper promise: the #[CpResource] attribute fuses a business record with all of the platform's powers. The automatic admin panel is now part of that promise.
Two attributes
#[CpResource] registers the entity with the platform (capabilities, audit, multi-tenant, workflow). The new #[CpField] property attribute is presentation metadata: label, show in list, show in form, sortable, widget type.
Field resolution
ResourceFieldResolver combines Doctrine ClassMetadata with #[CpField] to produce field descriptors. Refused by name: password, token, secret, hash, roles, data, tenant_id — those columns never reach the UI. In Doctrine 3 a FieldMapping is now an object; the resolver uses property access.
Form = strict allowlist
ResourceFormBuilder builds a Symfony form only from allowed fields (Manifesto Law 5.3). id and timestamps are read-only; enum columns become a choice list automatically.
Controller
Under /aacp/resources: a list with search / sort / paginate, new and edit (with workflow transition buttons + audit history), save, delete (soft if the entity is #[SoftDeletable]), transition. Every action is gated by {name}.{cap}, and TenantFilter is automatic.
There is no named #[CpResource] in the project yet — this is pure framework machinery. The moment a module adds a vehicle or invoice entity, the admin panel comes for free.
Comments (0)
No comments yet. Be the first to write one.
Leave a comment
Your comment will appear after it is reviewed.