WorkItemComment
extends WorkItemComment
in package
Comment on a work item, stored in a flat table instead of a shared `CommentThread`.
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_company_work_item_comments'
- #[TableAlias]
- 'workItemComment'
Table of Contents
Properties
- $authorName : string
- $byClient : bool
- $deleted : bool
- $id : int|null
- $insertDatetime : DateTime
- $ip : string|null
- $readDatetime : DateTime|null
- $text : string
- $userId : int|null
- $workItemId : int
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.
- getAuthorName() : string
- getId() : int|null
- getInsertDatetime() : DateTime
- getIp() : string|null
- getOwnerUserId() : int|null
- Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
- getReadDatetime() : DateTime|null
- getText() : string
- getUserId() : int|null
- getWorkItemId() : int
- isByClient() : bool
- isDeleted() : bool
- isPersisted() : bool
- isUnread() : bool
- Returns whether the other side has not seen the comment yet.
- setAuthorName() : $this
- setByClient() : $this
- setDeleted() : $this
- setId() : $this
- setInsertDatetime() : $this
- setIp() : $this
- setReadDatetime() : $this
- setText() : $this
- setUserId() : $this
- setWorkItemId() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$authorName
protected
string
$authorName
= ''
Attributes
- #[Column]
- $name: 'author_name'
- $type: 'string'
- $length: 100
$byClient
protected
bool
$byClient
= false
Attributes
- #[Column]
- $name: 'by_client'
- $type: 'boolean'
$deleted
protected
bool
$deleted
= false
Attributes
- #[Column]
- $name: 'deleted'
- $type: 'boolean'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'comment_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$ip
protected
string|null
$ip
= null
Attributes
- #[Column]
- $name: 'ip'
- $type: 'string'
- $length: 45
- $nullable: true
- #[PersonalData]
- PersonalDataKind::Hidden
$readDatetime
protected
DateTime|null
$readDatetime
= null
Attributes
- #[Column]
- $name: 'read_datetime'
- $type: 'datetime'
- $nullable: true
$text
protected
string
$text
= ''
Attributes
- #[Column]
- $name: 'text'
- $type: 'text'
$userId
protected
int|null
$userId
= null
Attributes
- #[Column]
- $name: 'cms_system_users_user_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- $nullable: true
$workItemId
protected
int
$workItemId
= 0
Attributes
- #[Column]
- $name: 'work_item_id'
- $type: 'integer'
- $options: ['unsigned' => true]
Methods
__construct()
public
__construct([int|null $id = null ][, int $workItemId = 0 ][, int|null $userId = null ][, bool $byClient = false ][, string $authorName = '' ][, string $text = '' ][, string|null $ip = null ][, DateTime $insertDatetime = new DateTime() ][, DateTime|null $readDatetime = null ][, bool $deleted = false ]) : mixed
Parameters
- $id : int|null = null
- $workItemId : int = 0
- $userId : int|null = null
- $byClient : bool = false
- $authorName : string = ''
- $text : string = ''
- $ip : string|null = null
- $insertDatetime : DateTime = new DateTime()
- $readDatetime : DateTime|null = null
- $deleted : bool = false
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>getAuthorName()
public
getAuthorName() : string
Return values
stringgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetIp()
public
getIp() : string|null
Return values
string|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|nullgetReadDatetime()
public
getReadDatetime() : DateTime|null
Return values
DateTime|nullgetText()
public
getText() : string
Return values
stringgetUserId()
public
getUserId() : int|null
Return values
int|nullgetWorkItemId()
public
getWorkItemId() : int
Return values
intisByClient()
public
isByClient() : bool
Return values
boolisDeleted()
public
isDeleted() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisUnread()
Returns whether the other side has not seen the comment yet.
public
isUnread() : bool
Return values
boolsetAuthorName()
public
setAuthorName(string $authorName) : $this
Parameters
- $authorName : string
Return values
$thissetByClient()
public
setByClient(bool $byClient) : $this
Parameters
- $byClient : bool
Return values
$thissetDeleted()
public
setDeleted(bool $deleted) : $this
Parameters
- $deleted : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime
Return values
$thissetIp()
public
setIp(string|null $ip) : $this
Parameters
- $ip : string|null
Return values
$thissetReadDatetime()
public
setReadDatetime(DateTime|null $readDatetime) : $this
Parameters
- $readDatetime : DateTime|null
Return values
$thissetText()
public
setText(string $text) : $this
Parameters
- $text : string
Return values
$thissetUserId()
public
setUserId(int|null $userId) : $this
Parameters
- $userId : int|null
Return values
$thissetWorkItemId()
public
setWorkItemId(int $workItemId) : $this
Parameters
- $workItemId : 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>