CoolCMS API

UserDiscountLevel extends UserDiscountLevel
in package

Admin variant of the discount level code list (`cms_system_user_discount_levels`), hydrated from the Api endpoint `api/system/user-discount-level` via `ApiBridge`.

Flat entity without associations and translations.

Attributes
#[Entity]
#[Table]
$name: 'cms_system_user_discount_levels'
#[TableAlias]
'userDiscountLevel'

Table of Contents

Properties

$discount  : int
$from  : int
$id  : int|null
$to  : int

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.
getDiscount()  : int
getFrom()  : int
getId()  : int|null
getTo()  : int
isPersisted()  : bool
setDiscount()  : $this
setFrom()  : $this
setId()  : $this
setTo()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$from

protected int $from = 0
Attributes
#[Column]
$type: "integer"
$name: "`from`"

$id

protected int|null $id = null
Attributes
#[Column]
$type: "integer"
$name: "discount_level_id"
#[GeneratedValue]
#[Id]

$to

protected int $to = 0
Attributes
#[Column]
$type: "integer"
$name: "`to`"

Methods

__construct()

public __construct([int|null $id = null ][, int $discount = 0 ][, int $from = 0 ][, int $to = 0 ]) : mixed
Parameters
$id : int|null = null
$discount : int = 0
$from : int = 0
$to : int = 0

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>

setDiscount()

public setDiscount(int $discount) : $this
Parameters
$discount : int
Return values
$this

setFrom()

public setFrom(int $from) : $this
Parameters
$from : int
Return values
$this

setId()

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

setTo()

public setTo(int $to) : $this
Parameters
$to : int
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