InvoiceViewModel
extends ViewNode
in package
FinalYes
The only object templates receive. Every value is available formatted ($value->formatted or {{ $value }}) and raw ($value->raw).
Templates contain no calculation logic; all values are calculated beforehand.
Table of Contents
Properties
Methods
- __construct() : mixed
- __get() : mixed
- __isset() : bool
- accessLog() : AccessLog
- count() : int
- getIterator() : Traversable
- Items are read (and recorded) one by one while the template loops over them.
- isEmpty() : bool
- jsonSerialize() : mixed
- label() : string
- Translated label; per invoice overrides from the presentation data win.
- offsetExists() : bool
- offsetGet() : mixed
- offsetSet() : void
- offsetUnset() : void
- title() : string
- Document title (e.g. "Invoice", "Credit note") for PDF metadata and file names.
- toArray() : array<string|int, mixed>
- Plain values, e.g. for implode(); counts as reading every value below this node.
- read() : mixed
Properties
$data
protected
array<string|int, mixed>
$data
$log
protected
AccessLog
$log
$path
protected
string
$path
= ''
Methods
__construct()
public
__construct(array<string, mixed> $data[, AccessLog|null $log = null ][, array<string, string> $aliases = [] ]) : mixed
Parameters
- $data : array<string, mixed>
- $log : AccessLog|null = null
- $aliases : array<string, string> = []
-
view model nodes that stand for others, e.g. issuer => seller
__get()
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
boolaccessLog()
public
accessLog() : AccessLog
Return values
AccessLogcount()
public
count() : int
Return values
intgetIterator()
Items are read (and recorded) one by one while the template loops over them.
public
getIterator() : Traversable
Return values
TraversableisEmpty()
public
isEmpty() : bool
Return values
booljsonSerialize()
public
jsonSerialize() : mixed
label()
Translated label; per invoice overrides from the presentation data win.
public
label(string $key[, array<string, string> $replace = [] ]) : string
Parameters
- $key : string
- $replace : array<string, string> = []
Return values
stringoffsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
title()
Document title (e.g. "Invoice", "Credit note") for PDF metadata and file names.
public
title() : string
Return values
stringtoArray()
Plain values, e.g. for implode(); counts as reading every value below this node.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>read()
protected
read(string|int $key) : mixed
Parameters
- $key : string|int