Presenters
Table of Contents
Traits
- AdvertScopedListTrait
- Dedicated `myList` collection action for collections bound to one advert.
- AdvertScopeGuardTrait
- Single definition of the rule "may this caller see the data of one advert?".
- ApiClientKeyTrait
- Application key (`X-API-Key`) check on the external Api path.
- ApiPermissionGuardTrait
- Transport-independent RBAC guard for Api actions.
- CategorySuggestTrait
- Internal `suggest` action of the Api `CategoryPresenter` of a module (Bazaar, Comcat): the
category autocomplete of the watchdog. Read-only over the public category tree (name and
path), no personal data.
- CorsTrait
- CrudTrait
- Complete set of CRUD actions of an Api presenter: aggregates reading and writing so that the
admin gets full management of a section through `ApiBridge` (get, get-by, get-all, save,
update-columns, delete, delete-all).
- CurrencyInitTrait
- DeleteTrait
- GetAllTrait
- GetByTrait
- GetTrait
- InactiveRecordsReadFilterTrait
- Limits reads by an unprivileged caller to live records: no inactive or deleted records and no internal fields.
- JwtAuthTrait
- Identifies the user on the external Api path (Bearer JWT).
- LanguageInitTrait
- LocalizationInitTrait
- MessageThreadRolesTrait
- Resolves the `owner` and `receiver` roles over a private thread for the `MessageThread`, `Message` and `MessageParticipant` Api presenters.
- OwnedListTrait
- Dedicated collection action `myList` with a server-injected owner filter.
- OwnedOneTrait
- Dedicated action `myOne`, the single-record sibling of {@see OwnedListTrait}.
- OwnershipCheckTrait
- Ownership contract for both Api paths.
- PublicAdvertReadFilterTrait
- Api reads of adverts and categories (Bazaar, Comcat) by an external non-privileged caller return only what the
website shows: an advert that is published (`active`, the generated column with approval, payment, bans and
deletion, and not expired) or owned by the caller, a category that is active.
- RbacCheckTrait
- RBAC gate over the external Api path.
- RegisterEventTrait
- Increments an event counter (detail view or list view) on an entity.
- RequestShapeGuardTrait
- Controlled rejection of an external Api request whose parameter has the wrong shape
(see {@see \App\Core\Utils\Helpers\RequestParamShape}).
- ResponseReceiverTrait
- Receiver check of a response for the conditional `receiver` role, used by the Bazaar and Comcat
`ResponsePresenter`.
- SaveTrait
- SearchTrait
- Fulltext search as an Api endpoint.
- SettingInitTrait
- TreeTrait
- Api endpoints of tree operations.