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
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_blog_intro_image_relations'
- #[TableAlias]
- 'introImageRel'
Table of Contents
Properties
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|nullgetId()
Returns the intro id without triggering lazy loading.
public
getId() : int|null
Return values
int|nullgetImageId()
Returns the image id without triggering lazy loading of the proxy.
public
getImageId() : int|null
Return values
int|nullgetIntro()
public
getIntro() : TIntro|null
Return values
TIntro|nullgetLanguage()
public
getLanguage() : TLanguage|null
Return values
TLanguage|nullgetLanguageId()
public
getLanguageId() : int|null
Return values
int|nullgetOrder()
public
getOrder() : int
Return values
intisMain()
public
isMain() : bool
Return values
boolisRemoved()
public
isRemoved() : bool
Return values
boolsetAsset()
public
setAsset(TImage|null $asset) : $this
Parameters
- $asset : TImage|null
Return values
$thissetIntro()
public
setIntro(TIntro|null $intro) : $this
Parameters
- $intro : TIntro|null
Return values
$thissetLanguage()
public
setLanguage(TLanguage|null $language) : $this
Parameters
- $language : TLanguage|null
Return values
$thissetLanguageId()
public
setLanguageId(int|null $languageId) : $this
Parameters
- $languageId : int|null
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>