CoolCMS API

AdvertCategoryRel extends AdvertCategoryRel
in package

Admin variant of the profile-to-category link, with a composite PK (advert + category).

Read-only: shows the profile categories in the edit form, where they decide which dynamic parameters appear. Mirrors AdvertCategoryRel.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_comcat_advert_category_rel'
#[TableAlias]
'advertCategoryRel'

Table of Contents

Properties

$advert  : TAdvert|null
$category  : TCategory|null
$paid  : bool

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.
getCategory()  : TCategory|null
getPaid()  : bool
isPaid()  : bool
setAdvert()  : $this
setCategory()  : $this
setPaid()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$advert

protected TAdvert|null $advert = null
Attributes
#[EntityOf]
\App\UI\Admin\Comcat\Models\Entities\Advert::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_comcat_adverts_advert_id'
$referencedColumnName: 'advert_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\Advert::class
$inversedBy: 'categoryRels'

$category

protected TCategory|null $category = null
Attributes
#[EntityOf]
\App\UI\Admin\Comcat\Models\Entities\Category::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_comcat_categories_category_id'
$referencedColumnName: 'category_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Comcat\Models\Entities\Category::class

$paid

protected bool $paid = false
Attributes
#[Column]
$name: 'paid'
$type: 'boolean'

Methods

__construct()

public __construct([mixed $advert = null ][, mixed $category = null ][, bool $paid = false ]) : mixed
Parameters
$advert : mixed = null
$category : mixed = null
$paid : bool = false

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>

getCategory()

public getCategory() : TCategory|null
Return values
TCategory|null

setAdvert()

public setAdvert(TAdvert|null $advert) : $this
Parameters
$advert : TAdvert|null
Return values
$this

setCategory()

public setCategory(TCategory|null $category) : $this
Parameters
$category : TCategory|null
Return values
$this

setPaid()

public setPaid(bool $paid) : $this
Parameters
$paid : bool
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