CoolCMS API

CarouselItem extends CarouselItem
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_carousel_items'
#[TableAlias]
'carouselItem'

Table of Contents

Properties

$carousel  : Carousel|null
$carouselId  : int
$id  : int|null
$translations  : Collection

Methods

__construct()  : mixed
addTranslation()  : $this
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.
getCarouselId()  : int
getId()  : int|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isPersisted()  : bool
removeTranslation()  : $this
setCarouselId()  : $this
setId()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

protected Carousel|null $carousel = null
#[JoinColumn]
$name: 'cms_mod_blog_carousels_carousel_id'
$referencedColumnName: 'carousel_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Blog\Models\Entities\Carousel::class
$inversedBy: 'items'

$carouselId

protected int $carouselId = 0
Attributes
#[Column]
$type: 'integer'
$name: 'cms_mod_blog_carousels_carousel_id'
$options: ['unsigned' => true]
$insertable: false
$updatable: false

$id

protected int|null $id = null
Attributes
#[Column]
$type: 'integer'
$name: 'carousel_item_id'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$translations

protected Collection $translations
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\Blog\Models\Entities\CarouselItemText::class
$mappedBy: 'parent'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

Methods

__construct()

public __construct([int|null $id = null ][, int $carouselId = 0 ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$carouselId : int = 0
$translations : Collection = new ArrayCollection()

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

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>

getCarouselId()

public getCarouselId() : int
Return values
int

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setCarouselId()

public setCarouselId(int $id) : $this
Parameters
$id : int
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
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