CoolCMS API

PdfTemplateVariant extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait, TranslationCollectionTrait, PdfTemplateVariantLayoutTextCollectionTrait

AbstractYes
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'pdfTemplateVariant'

Table of Contents

Interfaces

IdentifiableInterface
Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).

Properties

$css  : string
$id  : int|null
$layoutTexts  : Collection<int, TLayoutText>
$pdfTemplateId  : int|null
$translations  : Collection<int, TTranslation>

Methods

__construct()  : mixed
addLayoutText()  : $this
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
clearLayoutTexts()  : $this
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCss()  : string
getId()  : int|null
getLayoutText()  : TLayoutText|null
getLayoutTexts()  : Collection<int, TLayoutText>
getPdfTemplateId()  : int|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isPersisted()  : bool
pdfTemplateVariantLayoutTextCollectionInit()  : void
removeLayoutText()  : $this
removeTranslation()  : $this
setCss()  : $this
setId()  : $this
setLayoutTexts()  : $this
setPdfTemplateId()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$id

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

$pdfTemplateId

protected int|null $pdfTemplateId = null
Attributes
#[Column]
$name: 'cms_system_pdf_templates_pdf_template_id'
$type: 'integer'
$options: ['unsigned' => true]
$insertable: false
$updatable: false

$translations

protected Collection<int, TTranslation> $translations = new ArrayCollection()

Methods

__construct()

public __construct([int|null $id = null ][, int|null $pdfTemplateId = null ][, string $css = '' ][, Collection $translations = new ArrayCollection() ][, Collection $layoutTexts = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$pdfTemplateId : int|null = null
$css : string = ''
$translations : Collection = new ArrayCollection()
$layoutTexts : 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>

getLayoutText()

public getLayoutText([int|null $layoutId = null ][, int|null $languageId = null ]) : TLayoutText|null
Parameters
$layoutId : int|null = null
$languageId : int|null = null
Return values
TLayoutText|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>

removeTranslation()

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

setCss()

public setCss(string $css) : $this
Parameters
$css : string
Return values
$this

setId()

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

setLayoutTexts()

public setLayoutTexts(Collection<int, TLayoutText>|array<string|int, TLayoutText> $layoutTexts) : $this
Parameters
$layoutTexts : Collection<int, TLayoutText>|array<string|int, TLayoutText>
Return values
$this

setPdfTemplateId()

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