CommentThread
extends CommentThread
in package
Admin variant of a comment thread (`cms_mod_base_comment_threads`).
Serves only as a hydration target (EntityOf) for entities whose admin edit needs the thread id (article, ...) to render the comments tab through CommentThread.
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_base_comment_threads'
- #[TableAlias]
- 'commentThread'
Table of Contents
Properties
- $commentCount : int
- $id : int|null
- $type : ThreadType|null
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.
- getCommentCount() : int
- getId() : int|null
- getType() : ThreadType|null
- isPersisted() : bool
- setCommentCount() : $this
- setId() : $this
- setType() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$commentCount
protected
int
$commentCount
= 0
Attributes
- #[Column]
- $name: 'comment_count'
- $type: 'integer'
- $options: ['unsigned' => true]
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- $name: 'comment_thread_id'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$type
protected
ThreadType|null
$type
= null
Attributes
- #[Column]
- $name: 'type'
- $type: 'string'
- $length: 32
- $nullable: true
- $enumType: ThreadType::class
Methods
__construct()
public
__construct([int|null $id = null ][, int $commentCount = 0 ][, ThreadType|null $type = null ]) : mixed
Parameters
- $id : int|null = null
- $commentCount : int = 0
- $type : ThreadType|null = null
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>getCommentCount()
public
getCommentCount() : int
Return values
intgetId()
public
getId() : int|null
Return values
int|nullgetType()
public
getType() : ThreadType|null
Return values
ThreadType|nullisPersisted()
public
isPersisted() : bool
Return values
boolsetCommentCount()
public
setCommentCount(int $commentCount) : $this
Parameters
- $commentCount : int
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetType()
public
setType(ThreadType|null $type) : $this
Parameters
- $type : ThreadType|null
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>