CoolCMS API

ArticlePollRel extends BaseEntity
in package

AbstractYes

Join entity linking an article to an poll (`cms_mod_blog_article_poll_relations`).

The PK is a derived identity (article + poll); order is the position of the poll within the article. Association mappings live in the concrete Admin/Api/Front variants.

Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: '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

$order

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

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