ArticleAdvertRel
extends BaseEntity
in package
AbstractYes
Join entity linking an article to an advert (`cms_mod_blog_article_advert_relations`).
The PK is a derived identity (article + advert); order is the position of the advert within the
article. Association mappings live in the concrete Admin/Api/Front variants.
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'articleAdvertRel'
Table of Contents
Properties
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAdvert() : TAdvert|null
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getArticle() : TArticle|null
- getOrder() : int
- setAdvert() : $this
- setArticle() : $this
- setOrder() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$advert
protected
TAdvert|null
$advert
= null
$article
protected
TArticle|null
$article
= null
$order
protected
int
$order
= 0
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
- $options: ['unsigned' => true, 'default' => 0]
Methods
__construct()
public
__construct([mixed $article = null ][, mixed $advert = null ][, int $order = 0 ]) : mixed
Parameters
- $article : mixed = null
- $advert : mixed = null
- $order : int = 0
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAdvert()
public
getAdvert() : TAdvert|null
Return values
TAdvert|nullgetAllTraits()
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
intsetAdvert()
public
setAdvert(TAdvert|null $advert) : $this
Parameters
- $advert : TAdvert|null
Return values
$thissetArticle()
public
setArticle(TArticle|null $article) : $this
Parameters
- $article : TArticle|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
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>