CoolCMS API

PdfTemplateLayout extends PdfTemplateLayout
in package

Admin variant of the PDF layout code list, hydrated from the Api endpoint `api/system/pdf-template-layout` via `ApiBridge`. Read-only: it only supplies the options of the invoice PDF layout select in Settings.

Attributes
#[Entity]
#[Table]
$name: 'cms_system_pdf_template_layouts'
#[TableAlias]
'pdfTemplateLayout'

Table of Contents

Properties

$css  : string
$id  : int|null
$isDefault  : bool
$key  : string
$name  : string

Methods

__construct()  : mixed
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.
getCss()  : string
getId()  : int|null
getIsDefault()  : bool
getKey()  : string
getName()  : string
isDefault()  : bool
isPersisted()  : bool
setCss()  : $this
setId()  : $this
setIsDefault()  : $this
setKey()  : $this
setName()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$css

protected string $css = ''
Attributes
#[Column]
$name: 'css'
$type: 'text'

$id

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

$isDefault

protected bool $isDefault = false
Attributes
#[Column]
$name: 'is_default'
$type: 'boolean'

$key

protected string $key = ''
Attributes
#[Column]
$name: '`key`'
$type: 'string'
$length: 50

$name

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

Methods

__construct()

public __construct([int|null $id = null ][, string $key = '' ][, string $name = '' ][, string $css = '' ][, bool $isDefault = false ]) : mixed
Parameters
$id : int|null = null
$key : string = ''
$name : string = ''
$css : string = ''
$isDefault : 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>

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

setIsDefault()

public setIsDefault(bool $isDefault) : $this
Parameters
$isDefault : bool
Return values
$this

setKey()

public setKey(string $key) : $this
Parameters
$key : string
Return values
$this

setName()

public setName(string $name) : $this
Parameters
$name : string
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