CoolCMS API

PdfTemplateVariantText extends PdfTemplateVariantText
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_system_pdf_template_variant_texts'
#[TableAlias]
'pdfTemplateVariantText'

Table of Contents

Properties

$activeTranslation  : bool
$languageId  : int|null
$name  : string
$parent  : mixed
$pdfTemplateVariant  : TPdfTemplateVariant|null
$shortName  : string|null
Short label for the variant-nav pill (independent of `name`, nullable).

Methods

__construct()  : mixed
`header`/`html`/`footer` were removed: the content lives in {@see PdfTemplateVariantLayoutText} (per variant and layout). `name` and `active_translation` stay, the semantic variant name is independent of the look.
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActiveTranslation()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getLanguageId()  : int|null
Translation language; null only for a new entity before `setLanguageId()`.
getName()  : string
getParent()  : object|null
getPdfTemplateVariant()  : TPdfTemplateVariant|null
getShortName()  : string|null
isActiveTranslation()  : bool
setActiveTranslation()  : $this
setLanguageId()  : $this
setName()  : $this
setParent()  : static
setPdfTemplateVariant()  : $this
setShortName()  : TPdfTemplateVariant>
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$activeTranslation

protected bool $activeTranslation = false
Attributes
#[Column]
$name: 'active_translation'
$type: 'boolean'

$languageId

protected int|null $languageId = null
Attributes
#[Column]
$name: 'cms_system_languages_language_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]
#[Identity]

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 45

$parent

protected mixed $parent = null
Attributes
#[Id]
#[JoinColumn]
$name: 'cms_system_pdf_template_variants_pdf_template_variant_id'
$referencedColumnName: 'pdf_template_variant_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\PdfTemplateVariant::class
$inversedBy: 'translations'

$shortName

Short label for the variant-nav pill (independent of `name`, nullable).

protected string|null $shortName = null
Attributes
#[Column]
$name: 'short_name'
$type: 'string'
$length: 45
$nullable: true

Methods

__construct()

`header`/`html`/`footer` were removed: the content lives in {@see PdfTemplateVariantLayoutText} (per variant and layout). `name` and `active_translation` stay, the semantic variant name is independent of the look.

public __construct([int|null $languageId = null ][, mixed $pdfTemplateVariant = null ][, string $name = '' ][, string|null $shortName = null ][, bool $activeTranslation = false ]) : mixed
Parameters
$languageId : int|null = null
$pdfTemplateVariant : mixed = null
$name : string = ''
$shortName : string|null = null
$activeTranslation : bool = false

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>

getLanguageId()

Translation language; null only for a new entity before `setLanguageId()`.

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

getPdfTemplateVariant()

public getPdfTemplateVariant() : TPdfTemplateVariant|null
Return values
TPdfTemplateVariant|null

setActiveTranslation()

public setActiveTranslation(bool $activeTranslation) : $this
Parameters
$activeTranslation : bool
Return values
$this

setLanguageId()

public setLanguageId(int $languageId) : $this
Parameters
$languageId : int
Return values
$this

setParent()

public setParent(object|null $parent) : static
Parameters
$parent : object|null
Return values
static

setPdfTemplateVariant()

public setPdfTemplateVariant(TPdfTemplateVariant|null $pdfTemplateVariant) : $this
Parameters
$pdfTemplateVariant : TPdfTemplateVariant|null
Return values
$this

setShortName()

public setShortName(string|null $shortName) : TPdfTemplateVariant>
Parameters
$shortName : string|null
Return values
TPdfTemplateVariant>

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