BlacklistRefusal
in package
FinalYes
Refused save of a record whose e-mail, phone or IP is on the blacklist (`cms_system_blacklists`).
The Api builds the failure (BlacklistManager::refusalFor()),
the front recognizes it by errorCode and shows self::MESSAGE_KEY instead of its generic
save error. Which value was blocked is in data.types (the registration form uses it per field).
Table of Contents
Constants
- ERROR_CODE : string = 'blacklisted'
- MESSAGE_KEY : string = '//' . self::TRANSLATION_KEY
- The same key for a component flash or form error (absolute `//` past the component domain).
- TRANSLATION_KEY : string = 'front.general.blacklisted'
- Full translation key of the front message (global translator).
Methods
- failure() : Result
- is() : bool
- Tells whether a failed save (a `Result` or a bridge response array) is a blacklist refusal.
Constants
ERROR_CODE
public
string
ERROR_CODE
= 'blacklisted'
MESSAGE_KEY
The same key for a component flash or form error (absolute `//` past the component domain).
public
string
MESSAGE_KEY
= '//' . self::TRANSLATION_KEY
TRANSLATION_KEY
Full translation key of the front message (global translator).
public
string
TRANSLATION_KEY
= 'front.general.blacklisted'
Methods
failure()
public
static failure(array<int, BlacklistType> $types) : Result
Parameters
- $types : array<int, BlacklistType>
Return values
Resultis()
Tells whether a failed save (a `Result` or a bridge response array) is a blacklist refusal.
public
static is(mixed $result) : bool
Parameters
- $result : mixed