CoolCMS API

Watchdog extends Watchdog
in package

Admin variant of a company watchdog, hydrated from `api/comcat/watchdog`.

The category and the region are object associations (the FK goes through category and region, without a scalar *Id), so the form sets them with a picker as managed references (object graph). typeId and stateId are scalar FKs to parameters (select).

The region is the unified System Region (cms_system_regions_region_id); module-specific regions are replaced by the System module.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_comcat_watchdogs'
#[TableAlias]
'watchdog'

Table of Contents

Properties

$active  : bool
$category  : TCategory|null
$email  : string|null
$id  : int|null
$insertDatetime  : DateTime|null
$insertIp  : string|null
$languageId  : int|null
$region  : TRegion|null
$stateId  : int|null
$typeId  : int|null
$userId  : int

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCategory()  : TCategory|null
getCategoryId()  : int|null
getEmail()  : string|null
getId()  : int|null
getInsertDatetime()  : DateTime|null
getInsertIp()  : string|null
getLanguageId()  : int|null
getOwnerUserId()  : int|null
Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
getRegion()  : TRegion|null
getRegionId()  : int|null
getStateId()  : int|null
getTypeId()  : int|null
getUserId()  : int
isActive()  : bool
isPersisted()  : bool
setActive()  : $this
setCategory()  : $this
setEmail()  : $this
setId()  : $this
setInsertDatetime()  : $this
setInsertIp()  : $this
setLanguageId()  : $this
setRegion()  : $this
setStateId()  : $this
setTypeId()  : $this
setUserId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

protected bool $active = false
Attributes
#[Column]
$name: 'active'
$type: 'boolean'

$category

protected TCategory|null $category = null
Attributes
#[EntityOf]
\App\UI\Admin\Comcat\Models\Entities\Category::class
#[JoinColumn]
$name: 'cms_mod_comcat_categories_category_id'
$referencedColumnName: 'category_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\Category::class

$email

protected string|null $email = null
Attributes
#[Column]
$name: 'email'
$type: 'text'
$nullable: true

$id

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

$insertDatetime

protected DateTime|null $insertDatetime = null
Attributes
#[Column]
$name: 'insert_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

$insertIp

protected string|null $insertIp = null
Attributes
#[Column]
$name: 'insert_ip'
$type: 'string'
$length: 45
$nullable: true
#[ExternalReadonly]
#[PersonalData]
PersonalDataKind::Hidden

$languageId

protected int|null $languageId = null
Attributes
#[Column]
$name: 'cms_system_languages_language_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$region

protected TRegion|null $region = null
Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\Region::class
#[JoinColumn]
$name: 'cms_system_regions_region_id'
$referencedColumnName: 'region_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\System\Models\Entities\Region::class

$stateId

protected int|null $stateId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_parameters_parameter_id2'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$typeId

protected int|null $typeId = null
Attributes
#[Column]
$name: 'cms_mod_comcat_parameters_parameter_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$userId

protected int $userId = 0
Attributes
#[Column]
$name: 'cms_system_users_user_id'
$type: 'integer'
$options: ['unsigned' => true]
#[ExternalReadonly]

Methods

__construct()

public __construct([int|null $id = null ][, int $userId = 0 ][, string|null $email = null ][, DateTime|null $insertDatetime = null ][, string|null $insertIp = null ][, int|null $languageId = null ][, bool $active = false ][, int|null $typeId = null ][, int|null $stateId = null ][, mixed $category = null ][, mixed $region = null ]) : mixed
Parameters
$id : int|null = null
$userId : int = 0
$email : string|null = null
$insertDatetime : DateTime|null = null
$insertIp : string|null = null
$languageId : int|null = null
$active : bool = false
$typeId : int|null = null
$stateId : int|null = null
$category : mixed = null
$region : mixed = null

callInitMethods()

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

public callInitMethods() : void

getActive()

public getActive() : bool
Return values
bool

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>

getCategory()

public getCategory() : TCategory|null
Return values
TCategory|null

getCategoryId()

public getCategoryId() : int|null
Return values
int|null

getEmail()

public getEmail() : string|null
Return values
string|null

getInsertDatetime()

public getInsertDatetime() : DateTime|null
Return values
DateTime|null

getInsertIp()

public getInsertIp() : string|null
Return values
string|null

getLanguageId()

public getLanguageId() : int|null
Return values
int|null

getOwnerUserId()

Returns the id of the user who created the record; `null` for an unknown or anonymous owner.

public getOwnerUserId() : int|null
Return values
int|null

getRegion()

public getRegion() : TRegion|null
Return values
TRegion|null

getRegionId()

public getRegionId() : int|null
Return values
int|null

getStateId()

public getStateId() : int|null
Return values
int|null

getTypeId()

public getTypeId() : int|null
Return values
int|null

getUserId()

public getUserId() : int
Return values
int

isActive()

public isActive() : bool
Return values
bool

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setCategory()

public setCategory(TCategory|null $category) : $this
Parameters
$category : TCategory|null
Return values
$this

setEmail()

public setEmail(string|null $email) : $this
Parameters
$email : string|null
Return values
$this

setId()

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

setInsertDatetime()

public setInsertDatetime(DateTime|null $insertDatetime) : $this
Parameters
$insertDatetime : DateTime|null
Return values
$this

setInsertIp()

public setInsertIp(string|null $insertIp) : $this
Parameters
$insertIp : string|null
Return values
$this

setLanguageId()

public setLanguageId(int|null $languageId) : $this
Parameters
$languageId : int|null
Return values
$this

setRegion()

public setRegion(TRegion|null $region) : $this
Parameters
$region : TRegion|null
Return values
$this

setStateId()

public setStateId(int|null $stateId) : $this
Parameters
$stateId : int|null
Return values
$this

setTypeId()

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

setUserId()

public setUserId(int $userId) : $this
Parameters
$userId : int
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