class VoucherCode extends AbstractModel

Class VoucherCode

Properties

int $id from AbstractModel
string $code
Date $creationDate
boolean $used
int $uses
int $priceRuleId
PriceRule $priceRule

Methods

static  null|AbstractModel
getById($id)

Get Range by id.

static  boolean
isMultiShop()

No description

static  boolean
isMultiShopFK()

No description

static  AbstractModel
create()

Create new instance of Pimcore Object.

static  AbstractModel|null
getByShopId($id, null $shopId = null)

No description

static  null|AbstractModel
getByField( string $field, string $value, int $shopId = null)

Get Range by id.

static  AbstractListing
getList()

get listing class.

static  AbstractModel[]
getAll()

Get all objects form this type.

int
getId()

No description

setId( int $id)

No description

string
getCacheKey()

No description

save()

save model to database.

bool
delete()

delete model.

getLocalizedFields()

Get LocalizedFields Provider.

setLocalizedFields($localizedFields)

Get LocalizedFields Provider.

AbstractModel
setValue($key, $value)

Override setValue function to support localized fields.

string
__toString()

No description

array
__sleep()

Prepare object to goto sleep.

__wakeup()

Prepare object to wakeup.

static  VoucherCode|null
getByCode($code)

No description

increaseUsage()

Increase Voucher Usage

decreaseUsage()

Decrease Voucher Usage

string
getCode()

No description

setCode( string $code)

No description

Date
getCreationDate()

No description

setCreationDate( Date $creationDate)

No description

boolean
getUsed()

No description

setUsed( boolean $used)

No description

int
getUses()

No description

setUses( int $uses)

No description

int
getPriceRuleId()

No description

setPriceRuleId( int $priceRuleId)

No description

getPriceRule()

No description

setPriceRule( PriceRule $priceRule)

No description

Details

in AbstractModel at line line 72
static null|AbstractModel getById($id)

Get Range by id.

Parameters

$id

Return Value

null|AbstractModel

in AbstractModel at line line 80
static boolean isMultiShop()

Return Value

boolean

in AbstractModel at line line 94
static boolean isMultiShopFK()

Return Value

boolean

in AbstractModel at line line 112
static AbstractModel create()

Create new instance of Pimcore Object.

Return Value

AbstractModel

Exceptions

Exception

in AbstractModel at line line 122
static AbstractModel|null getByShopId($id, null $shopId = null)

Parameters

$id
null $shopId

Return Value

AbstractModel|null

in AbstractModel at line line 170
static null|AbstractModel getByField( string $field, string $value, int $shopId = null)

Get Range by id.

Parameters

string $field
string $value
int $shopId

Return Value

null|AbstractModel

in AbstractModel at line line 223
static AbstractListing getList()

get listing class.

Return Value

AbstractListing

Exceptions

Exception

in AbstractModel at line line 243
static AbstractModel[] getAll()

Get all objects form this type.

Return Value

AbstractModel[]

in AbstractModel at line line 253
int getId()

Return Value

int

in AbstractModel at line line 261
setId( int $id)

Parameters

int $id

in AbstractModel at line line 269
string getCacheKey()

Return Value

string

in AbstractModel at line line 277
save()

save model to database.

in AbstractModel at line line 294
bool delete()

delete model.

Return Value

bool

in AbstractModel at line line 310
LocalizedFields|null getLocalizedFields()

Get LocalizedFields Provider.

Return Value

LocalizedFields|null

in AbstractModel at line line 329
setLocalizedFields($localizedFields)

Get LocalizedFields Provider.

Parameters

$localizedFields

in AbstractModel at line line 342
AbstractModel setValue($key, $value)

Override setValue function to support localized fields.

Parameters

$key
$value

Return Value

AbstractModel

at line line 99
string __toString()

Return Value

string

in AbstractModel at line line 370
array __sleep()

Prepare object to goto sleep.

Return Value

array

in AbstractModel at line line 390
__wakeup()

Prepare object to wakeup.

at line line 62
static VoucherCode|null getByCode($code)

Parameters

$code

Return Value

VoucherCode|null

at line line 70
increaseUsage()

Increase Voucher Usage

at line line 80
decreaseUsage()

Decrease Voucher Usage

at line line 107
string getCode()

Return Value

string

at line line 115
setCode( string $code)

Parameters

string $code

at line line 123
Date getCreationDate()

Return Value

Date

at line line 131
setCreationDate( Date $creationDate)

Parameters

Date $creationDate

at line line 139
boolean getUsed()

Return Value

boolean

at line line 147
setUsed( boolean $used)

Parameters

boolean $used

at line line 155
int getUses()

Return Value

int

at line line 163
setUses( int $uses)

Parameters

int $uses

at line line 171
int getPriceRuleId()

Return Value

int

at line line 179
setPriceRuleId( int $priceRuleId)

Parameters

int $priceRuleId

at line line 187
PriceRule getPriceRule()

Return Value

PriceRule

at line line 201
setPriceRule( PriceRule $priceRule)

Parameters

PriceRule $priceRule

Exceptions

Exception