CoolCMS API

Blacklist extends Blacklist
in package

Front end variant of the blacklist (`cms_system_blacklists`), hydrated from the Api endpoint `api/system/blacklist` (through ApiBridge). A flat entity: value plus type.

IMPORTANT: without it BlacklistMapper::getEntityClass() would point to a nonexistent class, the hydrator would drop every row ([EntityHydrator] Reference not found … Entity skipped) and RegistrationForm\FormTrait::isNotBlacklisted() would always return true, so the blacklist check on self-registration would be dead even though RBAC allows the read.

Attributes
#[Entity]
#[Table]
$name: 'cms_system_blacklists'
#[TableAlias]
'blacklist'

Table of Contents

Properties

$id  : int|null
$typeId  : int
$value  : string

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getId()  : int|null
getType()  : BlacklistType|null
Returns the type as an enum (null when `typeId` matches no value).
getTypeId()  : int
getValue()  : string
isPersisted()  : bool
setId()  : $this
setType()  : $this
setTypeId()  : $this
setValue()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'blacklist_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$typeId

protected int $typeId = 1
Attributes
#[Column]
$name: 'type_id'
$type: 'smallint'
$options: ['unsigned' => true]

$value

protected string $value = ''
Attributes
#[Column]
$name: 'value'
$type: 'text'

Methods

__construct()

public __construct([int|null $id = null ][, string $value = '' ][, int $typeId = 1 ]) : mixed
Parameters
$id : int|null = null
$value : string = ''
$typeId : int = 1

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

getTypeId()

public getTypeId() : int
Return values
int

getValue()

public getValue() : string
Return values
string

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setTypeId()

public setTypeId(int $typeId) : $this
Parameters
$typeId : int
Return values
$this

setValue()

public setValue(string $value) : $this
Parameters
$value : string
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results