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
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'articlePollRel'
Table of Contents
Properties
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
$order
protected
int
$order
= 0
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
- $options: ['unsigned' => true, 'default' => 0]
$poll
protected
TPoll|null
$poll
= null
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|nullgetOrder()
public
getOrder() : int
Return values
intgetPoll()
public
getPoll() : TPoll|null
Return values
TPoll|nullsetArticle()
public
setArticle(TArticle|null $article) : $this
Parameters
- $article : TArticle|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetPoll()
public
setPoll(TPoll|null $poll) : $this
Parameters
- $poll : TPoll|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>