PdfTemplateLayout
extends PdfTemplateLayout
in package
Code list of PDF invoice layouts (`cms_system_pdf_template_layouts`); separates the look (css) from the semantics of variants. The look of invoices is chosen by one select in the billing settings (`invoice.pdf.layoutId`); the per-variant content for a layout lives in {@see PdfTemplateVariantLayoutText}. Exactly one row may have `isDefault=true` (enforced in the admin CRUD, not by a db constraint).
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>getCss()
public
getCss() : string
Return values
stringgetId()
public
getId() : int|null
Return values
int|nullgetIsDefault()
public
getIsDefault() : bool
Return values
boolgetKey()
public
getKey() : string
Return values
stringgetName()
public
getName() : string
Return values
stringisDefault()
public
isDefault() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolsetCss()
public
setCss(string $css) : $this
Parameters
- $css : string
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetIsDefault()
public
setIsDefault(bool $isDefault) : $this
Parameters
- $isDefault : bool
Return values
$thissetKey()
public
setKey(string $key) : $this
Parameters
- $key : string
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thisgetTraitsRecursive()
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>