CoolCMS API

AdvertCategoryRel extends BaseEntity
in package
implements CategoryRelInterface

AbstractYes
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'advertCategoryRel'

Table of Contents

Interfaces

CategoryRelInterface
Link between a record and a category (e.g. advert to category); assembled into {@see \App\Core\Traits\Shared\Models\Entities\Collections\CategoryRelCollectionTrait::getCategories()}.

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

$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