CoolCMS API

IntroAssetRel extends IntroAssetRel
in package

Admin variant of the per-language intro panel image link (`cms_mod_blog_intro_image_relations`), hydrated from the Api via the includes `assetRels.asset` and `assetRels.language`.

Used only to show the per-language preview in the edit form; files are written by the Api layer (IntroManager).

Maps the same table as the Api IntroAssetRel and mirrors its composite PK (intro, language, asset).

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_intro_image_relations'
#[TableAlias]
'introImageRel'

Table of Contents

Properties

$asset  : TImage|null
$intro  : TIntro|null
$language  : TLanguage|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getAsset()  : TImage|null
getId()  : int|null
Returns the intro id without triggering lazy loading.
getImageId()  : int|null
Returns the image id without triggering lazy loading of the proxy.
getIntro()  : TIntro|null
getLanguage()  : TLanguage|null
getLanguageId()  : int|null
getOrder()  : int
isMain()  : bool
isRemoved()  : bool
setAsset()  : $this
setIntro()  : $this
setLanguage()  : $this
setLanguageId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$asset

protected TImage|null $asset = null
Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\Asset::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_images_image_id'
$referencedColumnName: 'image_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\System\Models\Entities\Asset::class

$intro

protected TIntro|null $intro = null
Attributes
#[EntityOf]
\App\UI\Admin\Blog\Models\Entities\Intro::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_blog_intros_intro_id'
$referencedColumnName: 'intro_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Blog\Models\Entities\Intro::class
$inversedBy: 'assetRels'

$language

protected TLanguage|null $language = null
Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\Language::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_languages_language_id'
$referencedColumnName: 'language_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Admin\System\Models\Entities\Language::class

Methods

__construct()

public __construct([mixed $intro = null ][, mixed $language = null ][, mixed $asset = null ][, int|null $languageId = null ]) : mixed
Parameters
$intro : mixed = null
$language : mixed = null
$asset : mixed = null
$languageId : int|null = null

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>

getAsset()

public getAsset() : TImage|null
Return values
TImage|null

getId()

Returns the intro id without triggering lazy loading.

public getId() : int|null
Return values
int|null

getImageId()

Returns the image id without triggering lazy loading of the proxy.

public getImageId() : int|null
Return values
int|null

getIntro()

public getIntro() : TIntro|null
Return values
TIntro|null

getLanguage()

public getLanguage() : TLanguage|null
Return values
TLanguage|null

getLanguageId()

public getLanguageId() : int|null
Return values
int|null

setAsset()

public setAsset(TImage|null $asset) : $this
Parameters
$asset : TImage|null
Return values
$this

setIntro()

public setIntro(TIntro|null $intro) : $this
Parameters
$intro : TIntro|null
Return values
$this

setLanguage()

public setLanguage(TLanguage|null $language) : $this
Parameters
$language : TLanguage|null
Return values
$this

setLanguageId()

public setLanguageId(int|null $languageId) : $this
Parameters
$languageId : int|null
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