CoolCMS API

PollText extends PollText
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_base_poll_texts'
#[TableAlias]
'pollText'

Table of Contents

Properties

$activeTranslation  : bool
$languageId  : int|null
$parent  : mixed
$poll  : TPoll|null
$question  : string

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActiveTranslation()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getLanguageId()  : int|null
Translation language; null only for a new entity before `setLanguageId()`.
getParent()  : object|null
getPoll()  : TPoll|null
getQuestion()  : string
isActiveTranslation()  : bool
setActiveTranslation()  : $this
setLanguageId()  : $this
setParent()  : static
setPoll()  : $this
setQuestion()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$activeTranslation

protected bool $activeTranslation = true
Attributes
#[Column]
$name: 'active_translation'
$type: 'boolean'

$languageId

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

$parent

protected mixed $parent = null
Attributes
#[EntityOf]
\App\UI\Admin\Base\Models\Entities\Poll::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_base_polls_poll_id'
$referencedColumnName: 'poll_id'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Base\Models\Entities\Poll::class
$inversedBy: 'translations'

$question

protected string $question = ''
Attributes
#[Column]
$name: 'question'
$type: 'string'
$length: 255

Methods

__construct()

public __construct([int|null $languageId = null ][, mixed $poll = null ][, string $question = '' ][, bool $activeTranslation = true ]) : mixed
Parameters
$languageId : int|null = null
$poll : mixed = null
$question : string = ''
$activeTranslation : bool = true

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>

getLanguageId()

Translation language; null only for a new entity before `setLanguageId()`.

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

getPoll()

public getPoll() : TPoll|null
Return values
TPoll|null

getQuestion()

public getQuestion() : string
Return values
string

setActiveTranslation()

public setActiveTranslation(bool $activeTranslation) : $this
Parameters
$activeTranslation : bool
Return values
$this

setLanguageId()

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

setParent()

public setParent(object|null $parent) : static
Parameters
$parent : object|null
Return values
static

setPoll()

public setPoll(TPoll|null $poll) : $this
Parameters
$poll : TPoll|null
Return values
$this

setQuestion()

public setQuestion(string $question) : $this
Parameters
$question : 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