CoolCMS API

ArticlePollRel extends ArticlePollRel
in package

Api variant of the article-poll link (join entity with an `order` column).

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_article_poll_relations'
#[TableAlias]
'articlePollRel'

Table of Contents

Properties

$article  : TArticle|null
$order  : int
$poll  : TPoll|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.
getArticle()  : TArticle|null
getOrder()  : int
getPoll()  : TPoll|null
setArticle()  : $this
setOrder()  : $this
setPoll()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$article

protected TArticle|null $article = null
Attributes
#[Id]
#[JoinColumn]
$name: 'cms_mod_blog_articles_article_id'
$referencedColumnName: 'article_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Blog\Models\Entities\Article::class
$inversedBy: 'pollRels'

$order

protected int $order = 0
Attributes
#[Column]
$name: '`order`'
$type: 'integer'
$options: ['unsigned' => true, 'default' => 0]

$poll

protected TPoll|null $poll = null
Attributes
#[Id]
#[JoinColumn]
$name: 'cms_mod_base_polls_poll_id'
$referencedColumnName: 'poll_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Base\Models\Entities\Poll::class

Methods

__construct()

public __construct([mixed $article = null ][, mixed $poll = null ][, int $order = 0 ]) : mixed
Parameters
$article : mixed = null
$poll : mixed = null
$order : int = 0

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>

getArticle()

public getArticle() : TArticle|null
Return values
TArticle|null

getPoll()

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

setArticle()

public setArticle(TArticle|null $article) : $this
Parameters
$article : TArticle|null
Return values
$this

setOrder()

public setOrder(int $order) : $this
Parameters
$order : int
Return values
$this

setPoll()

public setPoll(TPoll|null $poll) : $this
Parameters
$poll : TPoll|null
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