CoolCMS API

ProductTag extends ProductTag
in package

Product tag (badge). `attributeClass` is the CSS class of the badge (appearance only).

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_product_tags'
#[TableAlias]
'productTag'

Table of Contents

Properties

$attributeClass  : string|null
$id  : int|null
$newFlag  : bool
$recommendedFlag  : bool
$saleFlag  : bool
$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.
getAttributeClass()  : string|null
getId()  : int|null
getNewFlag()  : bool
getRecommendedFlag()  : bool
getSaleFlag()  : bool
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isNewFlag()  : bool
isPersisted()  : bool
isRecommendedFlag()  : bool
isSaleFlag()  : bool
removeTranslation()  : $this
setAttributeClass()  : $this
setId()  : $this
setNewFlag()  : $this
setRecommendedFlag()  : $this
setSaleFlag()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$attributeClass

protected string|null $attributeClass = null
Attributes
#[Column]
$name: 'attribute_class'
$type: 'string'
$length: 15
$nullable: true

$id

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

$newFlag

protected bool $newFlag = false
Attributes
#[Column]
$name: 'new_flag'
$type: 'boolean'

$recommendedFlag

protected bool $recommendedFlag = false
Attributes
#[Column]
$name: 'recommended_flag'
$type: 'boolean'

$saleFlag

protected bool $saleFlag = false
Attributes
#[Column]
$name: 'sale_flag'
$type: 'boolean'

$translations

protected Collection $translations
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ProductTagText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ProductTagText::class
$mappedBy: 'parent'
$cascade: ['persist', 'remove']
$orphanRemoval: true
$fetch: 'LAZY'

Methods

__construct()

public __construct([int|null $id = null ][, string|null $attributeClass = null ][, bool $saleFlag = false ][, bool $recommendedFlag = false ][, bool $newFlag = false ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$attributeClass : string|null = null
$saleFlag : bool = false
$recommendedFlag : bool = false
$newFlag : bool = false
$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>

getAttributeClass()

public getAttributeClass() : string|null
Return values
string|null

getNewFlag()

public getNewFlag() : bool
Return values
bool

getRecommendedFlag()

public getRecommendedFlag() : bool
Return values
bool

getSaleFlag()

public getSaleFlag() : bool
Return values
bool

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>

isNewFlag()

public isNewFlag() : bool
Return values
bool

isRecommendedFlag()

public isRecommendedFlag() : bool
Return values
bool

isSaleFlag()

public isSaleFlag() : bool
Return values
bool

removeTranslation()

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

setAttributeClass()

public setAttributeClass(string|null $attributeClass) : $this
Parameters
$attributeClass : string|null
Return values
$this

setId()

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

setNewFlag()

public setNewFlag(bool $newFlag) : $this
Parameters
$newFlag : bool
Return values
$this

setRecommendedFlag()

public setRecommendedFlag(bool $recommendedFlag) : $this
Parameters
$recommendedFlag : bool
Return values
$this

setSaleFlag()

public setSaleFlag(bool $saleFlag) : $this
Parameters
$saleFlag : bool
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