Discount_Setting extends Entity implements IMappableEntity, JsonSerializable Uses Entity_ID

Represents a setting of a discount.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

IMappableEntity
JsonSerializable

Table of Contents

discount()  : Discount
Get associated discount entity.
discount_id()  : int
Retrieve ID of the associated discount id.
id()  : int
Retrieve ID of the Entity
jsonSerialize()  : mixed
key()  : string
Get the key of the setting.
mapEntity()  : mixed
set_discount()  : self
Associate a discount to this setting.
set_discount_id()  : self
Set the discount id to which this setting is associated to.
set_id()  : void
Set ID of the Entity
set_key()  : self
Set the key of the setting.
set_value()  : self
Set the value of the setting
value()  : mixed
Get the value of the setting.

Methods

discount_id()

Retrieve ID of the associated discount id.

public discount_id() : int
Return values
int

id()

Retrieve ID of the Entity

public id() : int
Return values
int

jsonSerialize()

public jsonSerialize() : mixed
Tags
inheritdoc
Return values
mixed

key()

Get the key of the setting.

public key() : string
Return values
string

mapEntity()

public static mapEntity(IEntityMapper $mapper) : mixed
Parameters
$mapper : IEntityMapper
Tags
inheritdoc
Return values
mixed

set_discount()

Associate a discount to this setting.

public set_discount(Discount $discount) : self
Parameters
$discount : Discount
Return values
self

set_discount_id()

Set the discount id to which this setting is associated to.

public set_discount_id(int $discount_id) : self
Parameters
$discount_id : int
Return values
self

set_id()

Set ID of the Entity

public set_id(int|string|null $id) : void
Parameters
$id : int|string|null

ID of the Entity

Return values
void

set_key()

Set the key of the setting.

public set_key(string $key) : self
Parameters
$key : string
Return values
self

set_value()

Set the value of the setting

public set_value(string $value) : self
Parameters
$value : string
Return values
self

value()

Get the value of the setting.

public value() : mixed
Return values
mixed

Search results