CoolCMS API

GalleryAssetRel extends GalleryAssetRel
in package

Gallery to image link with a position (drag&drop sortable in the admin).

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_gallery_image_relations'
#[TableAlias]
'galleryImageRel'

Table of Contents

Properties

$asset  : TImage|null
$gallery  : TGallery|null
$order  : int

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
getGallery()  : TGallery|null
getId()  : int|null
Returns the gallery id without triggering lazy loading (used to group relations).
getImageId()  : int|null
Returns the image id without triggering lazy loading of the proxy.
getOrder()  : int
isMain()  : bool
Whether this is the first image; the gallery has no `main` column.
isRemoved()  : bool
Always false: gallery images are hard deleted.
setAsset()  : $this
setGallery()  : $this
setOrder()  : $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\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
protected TGallery|null $gallery = null
#[EntityOf]
\App\UI\Front\Blog\Models\Entities\Gallery::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_mod_blog_galleries_gallery_id'
$referencedColumnName: 'gallery_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Front\Blog\Models\Entities\Gallery::class
$inversedBy: 'assetRels'

$order

protected int $order = 0
Attributes
#[Column]
$name: '`order`'
$type: 'integer'
$options: ['unsigned' => true]

Methods

__construct()

public __construct([mixed $gallery = null ][, mixed $asset = null ][, int $order = 0 ]) : mixed
Parameters
$gallery : mixed = null
$asset : mixed = null
$order : int = 0

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

getGallery()

public getGallery() : TGallery|null
Return values
TGallery|null

getId()

Returns the gallery id without triggering lazy loading (used to group relations).

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

isMain()

Whether this is the first image; the gallery has no `main` column.

public isMain() : bool
Return values
bool

isRemoved()

Always false: gallery images are hard deleted.

public isRemoved() : bool
Return values
bool

setAsset()

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

setGallery()

public setGallery(TGallery|null $gallery) : $this
Parameters
$gallery : TGallery|null
Return values
$this

setOrder()

public setOrder(int $order) : $this
Parameters
$order : int
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