CoolCMS API

AdvertConfirmationManager
in package
uses AdvertConfirmByKeyTrait

FinalYes

Confirms an advert by the key from the `BZ_ADVERT_ACTIVATION_REQUEST` e-mail ({@see AdvertConfirmByKeyTrait}).

Sits next to AdvertManager, which performs the column writes so that the cache is bumped. Called from :Api:Bazaar:Advert:confirmByKey (internal bridge only, grant guest).

Table of Contents

Properties

$advertManager  : AdvertManager
$advertService  : AdvertService
$categoryManager  : CategoryManager
$esDocumentSource  : AdvertDocumentSource
$esIndexer  : EsEntityIndexer
$rateLimit  : RateLimit
$rateLimitConfig  : RateLimitConfig

Methods

__construct()  : mixed
afterAdvertConfirmed()  : void
Applies the consequences of a confirmation: the ES document carries `confirmedAt` (fail-open, like `completedSave`), and with automatic confirmation off the category counts include only confirmed adverts.
afterRecordConfirmed()  : void
confirmationKeyInvalidCode()  : ResultCode
findAdvertForConfirmation()  : Advert|null
Loads the advert fresh from the DB (`useCache = false`); a cached copy would let a consumed key be used again.
findRecordForConfirmation()  : Advert|Advert|null
getConfirmModule()  : string
updateAdvertColumns()  : Result
updateConfirmationColumns()  : Result

Properties

Methods

__construct()

public __construct(AdvertManager $advertManager, AdvertService $advertService, CategoryManager $categoryManager, EsEntityIndexer $esIndexer, AdvertDocumentSource $esDocumentSource, RateLimit $rateLimit, RateLimitConfig $rateLimitConfig) : mixed
Parameters
$advertManager : AdvertManager
$advertService : AdvertService
$categoryManager : CategoryManager
$esIndexer : EsEntityIndexer
$esDocumentSource : AdvertDocumentSource
$rateLimit : RateLimit
$rateLimitConfig : RateLimitConfig

afterAdvertConfirmed()

Applies the consequences of a confirmation: the ES document carries `confirmedAt` (fail-open, like `completedSave`), and with automatic confirmation off the category counts include only confirmed adverts.

private afterAdvertConfirmed(int $advertId) : void
Parameters
$advertId : int

findAdvertForConfirmation()

Loads the advert fresh from the DB (`useCache = false`); a cached copy would let a consumed key be used again.

private findAdvertForConfirmation(int $advertId) : Advert|null
Parameters
$advertId : int
Return values
Advert|null

updateAdvertColumns()

private updateAdvertColumns(int $advertId, array<string, mixed> $values) : Result
Parameters
$advertId : int
$values : array<string, mixed>
Return values
Result

updateConfirmationColumns()

private updateConfirmationColumns(int $id, array<string, mixed> $values) : Result
Parameters
$id : int
$values : array<string, mixed>
Return values
Result
On this page

Search results