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
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
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
$insertIp
protected
string|null
$insertIp
= null
Attributes
- #[Column]
- $name: 'insert_ip'
- $type: 'string'
- $length: 45
- $nullable: true
- #[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]
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
boolgetAllTraits()
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|nullgetCategoryId()
public
getCategoryId() : int|null
Return values
int|nullgetEmail()
public
getEmail() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime|null
Return values
DateTime|nullgetInsertIp()
public
getInsertIp() : string|null
Return values
string|nullgetLanguageId()
public
getLanguageId() : int|null
Return values
int|nullgetOwnerUserId()
Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
public
getOwnerUserId() : int|null
Return values
int|nullgetRegion()
public
getRegion() : TRegion|null
Return values
TRegion|nullgetRegionId()
public
getRegionId() : int|null
Return values
int|nullgetStateId()
public
getStateId() : int|null
Return values
int|nullgetTypeId()
public
getTypeId() : int|null
Return values
int|nullgetUserId()
public
getUserId() : int
Return values
intisActive()
public
isActive() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetCategory()
public
setCategory(TCategory|null $category) : $this
Parameters
- $category : TCategory|null
Return values
$thissetEmail()
public
setEmail(string|null $email) : $this
Parameters
- $email : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime|null $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime|null
Return values
$thissetInsertIp()
public
setInsertIp(string|null $insertIp) : $this
Parameters
- $insertIp : string|null
Return values
$thissetLanguageId()
public
setLanguageId(int|null $languageId) : $this
Parameters
- $languageId : int|null
Return values
$thissetRegion()
public
setRegion(TRegion|null $region) : $this
Parameters
- $region : TRegion|null
Return values
$thissetStateId()
public
setStateId(int|null $stateId) : $this
Parameters
- $stateId : int|null
Return values
$thissetTypeId()
public
setTypeId(int|null $typeId) : $this
Parameters
- $typeId : int|null
Return values
$thissetUserId()
public
setUserId(int $userId) : $this
Parameters
- $userId : int
Return values
$thisgetTraitsRecursive()
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>