PendingPublicationNotice
in package
FinalYes
Picks the notice shown to the author after an advert, company profile or discussion post is submitted from the front end.
The decision depends on the state of the freshly loaded saved record, not on settings: the
Api already decided on insert from the author kind (EmailConfirmationSetting)
and automaticApproval.
confirmedAtnull: waits for the email link confirmation (sent to the record's email).approvedAtnull: waits for approval by an administrator.- Both: combined notice. Neither:
null, so the existing "saved" notice stays.
Returns a suffix of the translation key in the module form domain: result.pending.<suffix>.
Table of Contents
Constants
- APPROVAL : string = 'approval'
- CONFIRMATION : string = 'confirmation'
- CONFIRMATION_AND_APPROVAL : string = 'confirmationAndApproval'
Methods
- suffix() : string|null
- translationKey() : string|null
- Returns the full translation key under the domain (`<domain>.result.pending.<suffix>`), or null.
Constants
APPROVAL
public
string
APPROVAL
= 'approval'
CONFIRMATION
public
string
CONFIRMATION
= 'confirmation'
CONFIRMATION_AND_APPROVAL
public
string
CONFIRMATION_AND_APPROVAL
= 'confirmationAndApproval'
Methods
suffix()
public
static suffix(bool $confirmed, bool $approved) : string|null
Parameters
- $confirmed : bool
- $approved : bool
Return values
string|nulltranslationKey()
Returns the full translation key under the domain (`<domain>.result.pending.<suffix>`), or null.
public
static translationKey(string|null $domain, bool $confirmed, bool $approved) : string|null
A component without a domain (null) gets the key without a prefix, as forms do.
Parameters
- $domain : string|null
- $confirmed : bool
- $approved : bool