IntroAssetRel
extends BaseEntity
in package
implements
IdentifiableInterface, AssetRelInterface
AbstractYes
Tags
Attributes
- #[DefaultIncludes]
- ['language', 'asset']
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'introImageRel'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
- AssetRelInterface
- Link between an entity and an image or file (`*AssetRel`, `*ImageRel`) with order and flags.
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
$intro
protected
TIntro|null
$intro
= null
$language
protected
TLanguage|null
$language
= null
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>