GalleryAssetRel
extends GalleryAssetRel
in package
Gallery to image link with a position (drag&drop sortable in the admin).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_blog_gallery_image_relations'
- #[TableAlias]
- 'galleryImageRel'
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
- 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
- #[Id]
- #[JoinColumn]
- $name: 'cms_system_images_image_id'
- $referencedColumnName: 'image_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\Asset::class
$gallery
protected
TGallery|null
$gallery
= null
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_blog_galleries_gallery_id'
- $referencedColumnName: 'gallery_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\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|nullgetGallery()
public
getGallery() : TGallery|null
Return values
TGallery|nullgetId()
Returns the gallery id without triggering lazy loading (used to group relations).
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|nullgetOrder()
public
getOrder() : int
Return values
intisMain()
Whether this is the first image; the gallery has no `main` column.
public
isMain() : bool
Return values
boolisRemoved()
Always false: gallery images are hard deleted.
public
isRemoved() : bool
Return values
boolsetAsset()
public
setAsset(TImage|null $asset) : $this
Parameters
- $asset : TImage|null
Return values
$thissetGallery()
public
setGallery(TGallery|null $gallery) : $this
Parameters
- $gallery : TGallery|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
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>