Managers
Table of Contents
Traits
- AdvertCategoryPolicyTrait
- Category policy of an advert save (Bazaar, Comcat): a non-privileged caller may put an advert only
into an active category (with active ancestors) that is not "only for administrator".
- AdvertConfirmByKeyTrait
- Confirms an advert (Bazaar) or company profile (Comcat) by the key from the activation e-mail.
- AdvertCurrencyGuardTrait
- Guards the price currency of an advert (Bazaar and Comcat) in the Api layer.
- AdvertHardDeleteTrait
- Hard delete of an advert together with everything that belongs to it (Bazaar and Comcat Api `AdvertManager`).
- AdvertInitialApprovalTrait
- Approves a new advert (Bazaar, module 5) or company profile (Comcat, module 6) by the single module setting `advert.approval.auto`.
- AdvertParameterEditorHtmlTrait
- Sanitizes HTML values of editor parameters (`useEditor`) of an advert in the Api layer.
- AdvertParameterPolicyTrait
- Parameter rules of an advert save (Bazaar, Comcat) that the front form enforces, also for the Api: a value
longer than `max_length` (editor: visible text), a URL with `throw_error_on_url`, a blacklisted word of the page
language with `throw_error_on_blacklisted_word`, an empty required value and a choice option the form would
not offer.
- AdvertPasswordResetTrait
- The "forgot advert password" for adverts placed without an account
(Bazaar adverts, Comcat company profiles). One implementation for both modules; the using
manager-tier class supplies the module specifics.
- AdvertRegionAddressTrait
- Splits the advert address into city, postcode and country on save, on the server, by the selected municipality.
- AdvertReportGuardTrait
- Guards a new advert report (Bazaar and Comcat) in `beforeSave()`.
- AssetProcessingTrait
- Shared logic of asset (image) processing in the manager layer.
- AssetTrait
- AtomicTransactionTrait
- Real database transaction for Api operations that change several rows, where a partial write would leave an inconsistent state.
- BlacklistGuardTrait
- Blacklist gate of a record a visitor sends (comment, advert, response, order, ...): `beforeSave()` of
a new record calls {@see blacklistRefusal()} with its e-mail, phone and IP
({@see BlacklistManager::refusalFor()}; the administrator is not checked).
- CategoryParameterRelSyncTrait
- Synchronizes the parameter targeting of a category (`categoryParameterRels`) in `afterSave`
and propagates it to the whole subtree.
- CategoryPriceSyncTrait
- Propagates the category price list (matrix of {@see CategoryPriceInterface}) and the free flag
(`forFree`) to the whole subtree; opt-in via `meta['setPricesToChildren']` from the admin form.
- CommentThreadCreatorTrait
- Creates a comment thread ({@see CommentThread}) for an entity and links it through an FK column.
- ConfirmByKeyTrait
- Confirms a record by its author with the key from the e-mail; shared logic for an advert (Bazaar), a company profile (Comcat) and a discussion post.
- ContentCreationLimitTrait
- Limits content creation by a logged-in user in an Api manager.
- ContentCreditRewardTrait
- Credits for published content, the content module's half: finds which of the saved records are
published now and hands them to {@see UserManager::rewardPublishedContent()}, which pays at most
once per record.
- CountryCodeDerivationTrait
- ISO country code → derived free-text country on save.
- DeleteTrait
- DuplicateVoterGuardTrait
- Shared core of the "has this visitor already voted or rated this item?" check.
- GetAllTrait
- GetByTrait
- GetTrait
- InitialApprovalTrait
- Approves a new record according to the single module setting "automatic approval"
(key {@see InitialApprovalSetting::key()}: `advert.approval.auto` / `message.approval.auto`).
- InitialConfirmationTrait
- Confirmation of a new record by its author through an e-mail link.
- ManageKeyTrait
- Provides a "manage" link instead of a readable password in the insert e-mail of a record created
without an account: Bazaar advert, Comcat company profile, Discussion post ({@see ManageKeyAwareInterface}).
- MessageThreadCreatorTrait
- Opens a private conversation ({@see \App\UI\Api\Base\Models\Entities\MessageThread}) for an
entity and links it through an FK column.
- OptionRuleSyncTrait
- Synchronizes option rules (conditional display of options) from `meta['optionRules']` in
`ParameterManager::afterSave`.
- OptionsSyncTrait
- Synchronizes the options of a parameter from `meta['options']` in `ParameterManager::afterSave`
(Bazaar, Comcat and Eshop; the module names its tables, see {@see ParameterTablesTrait}).
- OwnedThreadDeleteTrait
- Deletes the comment and rating threads of hard-deleted records.
- ParameterGroupRuleSyncTrait
- Synchronizes display rules (`ParameterRule`) targeted at a parameter group.
- ParameterRuleGraphTrait
- Shared raw-DBAL synchronization of the display rule graph (`ParameterRule`) from `meta['rules']`.
- ParameterRuleSyncTrait
- Synchronizes display rules (`ParameterRule`) targeted at a parameter.
- ParameterTablesTrait
- Names the parameter tables of one module for the shared parameter sync traits
({@see OptionsSyncTrait}, {@see ParameterRuleGraphTrait} and its wrappers).
- RatingThreadCreatorTrait
- Creates a rating thread ({@see RatingThread}) for an entity and links it through an FK
column.
- RegisterEventTrait
- Increments an event counter (views, clicks, …) on an entity, with hooks.
- ReportedFlagSyncTrait
- Keeps the `reported` flag of a reported target (discussion post, advert, company profile) derived from its reports:
the target is reported while it has at least one unresolved report. One definition for the report managers of
Discussion, Bazaar and Comcat.
- ResponseColumnGuardTrait
- Guards advert responses against values that do not fit their columns.
- ResponseCurrencyGuardTrait
- Currency guard for advert responses and company inquiries (Bazaar and Comcat) in the Api layer.
- ResponseMarkReadTrait
- Marks a response as read from an e-mail link, without login, using only the key stored on
the response (column `read_key`, random, set by {@see self::generateReadKey()} in
`beforeSave()` when the response is created).
- ResponseThreadReadSyncTrait
- Synchronizes two read trackers: the `read` flag on a response and the unread messages in the
private-message thread the response created (`Response::$messageThreadId`).
- SaveTrait
- TotalCountTrait
- TreeTrait
- Public API of nested-set tree operations: moving and deleting a subtree. Wraps them in a
transaction and delegates to the service ({@see \App\Core\Traits\Api\Models\Services\TreeTrait}),
which handles cache invalidation, and to the mapper/repository, which run the set-based SQL.