CoolCMS API

Carousel extends Carousel
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_carousels'
#[TableAlias]
'carousel'

Table of Contents

Properties

$activated  : bool
$id  : int|null
$insertDatetime  : DateTime
$items  : Collection<int, CarouselItem>
$published  : DateTime|null
$translations  : Collection
$userId  : int|null

Methods

__construct()  : mixed
addItem()  : $this
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
clearItems()  : $this
getActivated()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getId()  : int|null
getInsertDatetime()  : DateTime
getItem()  : TItem|null
getItems()  : Collection<int, TItem>
getPublished()  : DateTime|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getUserId()  : int|null
isActivated()  : bool
isPersisted()  : bool
itemCollectionInit()  : void
removeItem()  : $this
removeTranslation()  : $this
setActivated()  : $this
setId()  : $this
setInsertDatetime()  : $this
setItems()  : $this
setPublished()  : $this
setTranslations()  : $this
setUserId()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$activated

protected bool $activated = false
Attributes
#[Column]
$type: 'boolean'
$name: 'activated'
#[ExternalReadonly]

$id

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

$insertDatetime

protected DateTime $insertDatetime = new DateTime()
Attributes
#[Column]
$type: 'datetime'
$name: 'insert_datetime'
#[ExternalReadonly]

$items

protected Collection<int, CarouselItem> $items
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\Blog\Models\Entities\CarouselItem::class
$mappedBy: 'carousel'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

$published

protected DateTime|null $published = null
Attributes
#[Column]
$type: 'datetime'
$name: 'published'
$nullable: true

$translations

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

$userId

protected int|null $userId = null
Attributes
#[Column]
$type: 'integer'
$name: 'cms_system_users_user_id'
$nullable: true
$options: ['unsigned' => true]
#[ExternalReadonly]

Methods

__construct()

public __construct([int|null $id = null ][, int|null $userId = null ][, DateTime|null $published = null ][, DateTime $insertDatetime = new DateTime() ][, bool $activated = false ][, Collection $translations = new ArrayCollection() ][, Collection $items = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$userId : int|null = null
$published : DateTime|null = null
$insertDatetime : DateTime = new DateTime()
$activated : bool = false
$translations : Collection = new ArrayCollection()
$items : Collection = new ArrayCollection()

addItem()

public addItem(TItem $item) : $this
Parameters
$item : TItem
Return values
$this

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

getActivated()

public getActivated() : bool
Return values
bool

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>

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getItem()

public getItem(int $itemId) : TItem|null
Parameters
$itemId : int
Return values
TItem|null

getItems()

public getItems() : Collection<int, TItem>
Return values
Collection<int, TItem>

getPublished()

public getPublished() : DateTime|null
Return values
DateTime|null

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>

getUserId()

public getUserId() : int|null
Return values
int|null

isActivated()

public isActivated() : bool
Return values
bool

removeItem()

public removeItem(TItem $item) : $this
Parameters
$item : TItem
Return values
$this

removeTranslation()

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

setActivated()

public setActivated(bool $val) : $this
Parameters
$val : bool
Return values
$this

setId()

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

setInsertDatetime()

public setInsertDatetime(DateTime $dt) : $this
Parameters
$dt : DateTime
Return values
$this

setItems()

public setItems(Collection<int, TItem>|array<int, TItem> $items) : $this
Parameters
$items : Collection<int, TItem>|array<int, TItem>
Return values
$this

setPublished()

public setPublished(DateTime|null $dt) : $this
Parameters
$dt : DateTime|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

setUserId()

public setUserId(int|null $id) : $this
Parameters
$id : int|null
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