CoolCMS API

Vat extends Vat
in package

Admin variant of a VAT rate (`cms_system_vats`), hydrated from the Api endpoint `api/system/vat` via `ApiBridge`. Flat entity: percentage and multiplier.

Attributes
#[Entity]
#[Table]
$name: 'cms_system_vats'
#[TableAlias]
'vat'

Table of Contents

Properties

$id  : int|null
$multiplier  : string
$percents  : 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.
getId()  : int|null
getMultiplier()  : string
getPercents()  : string
isPersisted()  : bool
setId()  : $this
setMultiplier()  : $this
setPercents()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$id

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

$multiplier

protected string $multiplier = '1.0000'
Attributes
#[Column]
$name: 'multiplier'
$type: 'decimal'
$precision: 6
$scale: 4

$percents

protected string $percents = '0.00'
Attributes
#[Column]
$name: 'percents'
$type: 'decimal'
$precision: 5
$scale: 2

Methods

__construct()

public __construct([int|null $id = null ][, string $percents = '0.00' ][, string $multiplier = '1.0000' ]) : mixed
Parameters
$id : int|null = null
$percents : string = '0.00'
$multiplier : string = '1.0000'

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>

getMultiplier()

public getMultiplier() : string
Return values
string

getPercents()

public getPercents() : string
Return values
string

setId()

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

setMultiplier()

public setMultiplier(string $multiplier) : $this
Parameters
$multiplier : string
Return values
$this

setPercents()

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