AdvertAssetRel
extends AdvertAssetRel
in package
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_bazaar_advert_image_rel'
- #[TableAlias]
- 'advertImageRel'
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.
- getAsset() : TImage|null
- getMain() : bool
- getOrder() : int
- getRemoved() : bool
- isMain() : bool
- isRemoved() : bool
- setAdvert() : $this
- setAsset() : $this
- setMain() : $this
- setOrder() : $this
- setRemoved() : $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\Front\Bazaar\Models\Entities\Advert::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_mod_bazaar_adverts_advert_id'
- $referencedColumnName: 'advert_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\Bazaar\Models\Entities\Advert::class
- $inversedBy: 'assetRels'
$asset
protected
TImage|null
$asset
= null
Attributes
- #[EntityOf]
- \App\UI\Front\System\Models\Entities\Asset::class
- #[Id]
- #[Identity]
- #[JoinColumn]
- $name: 'cms_system_images_image_id'
- $referencedColumnName: 'image_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Front\System\Models\Entities\Asset::class
$main
protected
bool
$main
= false
Attributes
- #[Column]
- $name: 'main'
- $type: 'boolean'
$order
protected
int
$order
= 0
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
- $options: ['unsigned' => true]
$removed
protected
bool
$removed
= false
Attributes
- #[Column]
- $name: 'removed'
- $type: 'boolean'
Methods
__construct()
public
__construct([mixed $advert = null ][, mixed $asset = null ][, bool $main = false ][, bool $removed = false ][, int $order = 0 ]) : mixed
Parameters
- $advert : mixed = null
- $asset : mixed = null
- $main : bool = false
- $removed : bool = false
- $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>getAsset()
public
getAsset() : TImage|null
Return values
TImage|nullgetMain()
public
getMain() : bool
Return values
boolgetOrder()
public
getOrder() : int
Return values
intgetRemoved()
public
getRemoved() : bool
Return values
boolisMain()
public
isMain() : bool
Return values
boolisRemoved()
public
isRemoved() : bool
Return values
boolsetAdvert()
public
setAdvert(TAdvert|null $advert) : $this
Parameters
- $advert : TAdvert|null
Return values
$thissetAsset()
public
setAsset(TImage|null $asset) : $this
Parameters
- $asset : TImage|null
Return values
$thissetMain()
public
setMain(bool $main) : $this
Parameters
- $main : bool
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetRemoved()
public
setRemoved(bool $removed) : $this
Parameters
- $removed : 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>