Baseline: main 23.0+ · Verified: main 26.800.0
| Task | Read |
|---|---|
| Files, action names, minimal controller, autowired params, PageNavigation | rules/basics.md |
Default prefilters, filter attributes, configureActions(), #[ActionAccess], custom filter |
rules/filters.md |
Errors, JSON envelope, response classes, renderView(), scopes, REST v3 |
rules/errors-response.md |
Invariants
- Actions only orchestrate: input → service →
Result→ data oraddErrors(). Services come in as action params (DI canon:bitrix-framework). - Filter attributes are Since main 26.250*; on older kernels use
configureActions(). Never both for one action (ActionConfigurationException). METHOD_*constants live onActionFilter\HttpMethod, not on the attributeAttribute\Rule\HttpMethod. Referencing them on the attribute throws while the controller is built, so every action of that controller fails.- Rule attributes append to the defaults (
Authentication,HttpMethod([GET, POST]),Csrf). Adding#[Authentication]or#[Csrf]again runs the filter twice. - With PascalCase files write the controller segment in class case:
vendor:module.Post.create. Lower-casepostresolves tolib/infrastructure/controller/post.phpand fails on Linux. REST lower-cases method names, so a PascalCase controller is unreachable over classic REST (bitrix-rest). - HTML (
renderView/renderComponent) only in controllers reached by routes;BX.ajax.runAction()expects JSON.