AdvertConfirmationManager
in package
uses
AdvertConfirmByKeyTrait
FinalYes
Confirms a company profile with the key from the `CC_ADVERT_ACTIVATION_REQUEST` e-mail ({@see AdvertConfirmByKeyTrait}).
Sits next to AdvertManager (column writes go through it to bump the cache) and is
called from :Api:Comcat: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
- Side effects of confirmation: the ES document carries `confirmedAt` (fail-open, like `completedSave()`), and with automatic confirmation off the category counts include only confirmed profiles.
- afterRecordConfirmed() : void
- confirmationKeyInvalidCode() : ResultCode
- findAdvertForConfirmation() : Advert|null
- Reads fresh from the DB (`useCache = false`); the query cache would let a consumed key be used again.
- findRecordForConfirmation() : Advert|Advert|null
- getConfirmModule() : string
- updateAdvertColumns() : Result
- updateConfirmationColumns() : Result
Properties
$advertManager read-only
private
AdvertManager
$advertManager
$advertService read-only
private
AdvertService
$advertService
$categoryManager read-only
private
CategoryManager
$categoryManager
$esDocumentSource read-only
private
AdvertDocumentSource
$esDocumentSource
$esIndexer read-only
private
EsEntityIndexer
$esIndexer
$rateLimit read-only
private
RateLimit
$rateLimit
$rateLimitConfig read-only
private
RateLimitConfig
$rateLimitConfig
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()
Side effects of confirmation: the ES document carries `confirmedAt` (fail-open, like `completedSave()`), and with automatic confirmation off the category counts include only confirmed profiles.
private
afterAdvertConfirmed(int $advertId) : void
Parameters
- $advertId : int
afterRecordConfirmed()
private
afterRecordConfirmed(int $id) : void
Parameters
- $id : int
confirmationKeyInvalidCode()
private
confirmationKeyInvalidCode() : ResultCode
Return values
ResultCodefindAdvertForConfirmation()
Reads fresh from the DB (`useCache = false`); the query cache would let a consumed key be used again.
private
findAdvertForConfirmation(int $advertId) : Advert|null
Parameters
- $advertId : int
Return values
Advert|nullfindRecordForConfirmation()
private
findRecordForConfirmation(int $id) : Advert|Advert|null
Parameters
- $id : int
Return values
Advert|Advert|nullgetConfirmModule()
private
getConfirmModule() : string
Return values
stringupdateAdvertColumns()
private
updateAdvertColumns(int $advertId, array<string, mixed> $values) : Result
Parameters
- $advertId : int
- $values : array<string, mixed>
Return values
ResultupdateConfirmationColumns()
private
updateConfirmationColumns(int $id, array<string, mixed> $values) : Result
Parameters
- $id : int
- $values : array<string, mixed>