AdvertCategoryRel
extends BaseEntity
in package
implements
CategoryRelInterface
AbstractYes
Tags
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
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
$category
protected
TCategory|null
$category
= null
$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
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>getCategory()
public
getCategory() : TCategory|null
Return values
TCategory|nullgetPaid()
public
getPaid() : bool
Return values
boolisPaid()
public
isPaid() : bool
Return values
boolsetAdvert()
public
setAdvert(TAdvert|null $advert) : $this
Parameters
- $advert : TAdvert|null
Return values
$thissetCategory()
public
setCategory(TCategory|null $category) : $this
Parameters
- $category : TCategory|null
Return values
$thissetPaid()
public
setPaid(bool $paid) : $this
Parameters
- $paid : bool
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>