1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс DiscountCouponTable
Граф наследования:DiscountCouponTable:

Открытые статические члены

static getTableName ()
static getMap ()
static validateDiscountId ()
static validateCoupon ()
static validateType ()
static checkDiscountId ($value, $primary, array $row, Main\Entity\Field $field)
static checkType ($value, $primary, array $row, Main\Entity\Field $field)
static checkCoupon ($value, $primary, array $row, Main\Entity\Field $field)
static onBeforeAdd (Main\Entity\Event $event)
static onAfterAdd (Main\Entity\Event $event)
static onBeforeUpdate (Main\Entity\Event $event)
static onUpdate (Main\Entity\Event $event)
static onAfterUpdate (Main\Entity\Event $event)
static onDelete (Main\Entity\Event $event)
static onAfterDelete (Main\Entity\Event $event)
static getCouponTypes ($extendedMode=false)
static disableCheckCouponsUse ()
static enableCheckCouponsUse ()
static isCheckedCouponsUse ()
static clearDiscountCheckList ()
static setDiscountCheckList ($discountList)
static updateUseCoupons ()
static deleteByDiscount ($discount)
static saveApplied ($coupons, $userId, Main\Type\DateTime $currentTime)
static addPacket (array $data, $count, $limit=0)
static checkPacket (array $data, $newDiscount=false)
static prepareCouponData (&$fields)
static isValidCouponType ($couponType)

Поля данных

const TYPE_UNKNOWN = 0x0000
const TYPE_BASKET_ROW = 0x0001
const TYPE_ONE_ORDER = 0x0002
const TYPE_MULTI_ORDER = 0x0004
const TYPE_ARCHIVED = 0x0008
const EVENT_ON_GENERATE_COUPON = 'onGenerateCoupon'
const EVENT_ON_AFTER_DELETE_DISCOUNT = 'onAfterDeleteDiscountCoupons'

Защищенные статические члены

static setUserID (array &$result, array $data, array $keys)
static setTimestamp (array &$result, array $data, array $keys)

Статические защищенные данные

static $discountCheckList = array()
static $checkDiscountCouponsUse = 0

Подробное описание

См. определение в файле discountcoupon.php строка 53

Методы

◆ addPacket()

addPacket ( array $data,
$count,
$limit = 0 )
static

Create one and more coupons for discount.

Аргументы
array$dataCoupon data.
int$countCoupos count.
int$limitMaximum number of attempts.
Возвращает
Main\Entity\Result

См. определение в файле discountcoupon.php строка 793

◆ checkCoupon()

checkCoupon ( $value,
$primary,
array $row,
Main\Entity\Field $field )
static

Check coupon - unique and exist.

Аргументы
int$valueCoupon.
array | int$primaryPrimary key.
array$rowCurrent data.
Main\Entity\Field$fieldField object.
Возвращает
bool|string

См. определение в файле discountcoupon.php строка 258

◆ checkDiscountId()

checkDiscountId ( $value,
$primary,
array $row,
Main\Entity\Field $field )
static

Check discount id.

Аргументы
int$valueDiscount id.
array | int$primaryPrimary key.
array$rowCurrent data.
Main\Entity\Field$fieldField object.
Возвращает
bool|string

См. определение в файле discountcoupon.php строка 220

◆ checkPacket()

checkPacket ( array $data,
$newDiscount = false )
static

Check data for create one or more coupons.

Аргументы
array$dataCoupon data.
bool$newDiscountNew discount flag.
Возвращает
Main\Entity\Result

См. определение в файле discountcoupon.php строка 908

◆ checkType()

checkType ( $value,
$primary,
array $row,
Main\Entity\Field $field )
static

Check coupon type.

Аргументы
int$valueCoupon type.
array | int$primaryPrimary key.
array$rowCurrent data.
Main\Entity\Field$fieldField object.
Возвращает
bool|string

См. определение в файле discountcoupon.php строка 237

◆ clearDiscountCheckList()

clearDiscountCheckList ( )
static

Clear discount list for update use coupons flag.

Возвращает
void

См. определение в файле discountcoupon.php строка 466

◆ deleteByDiscount()

deleteByDiscount ( $discount)
static

Delete all coupons for discount.

Аргументы
int$discountDiscount id.
Возвращает
void

См. определение в файле discountcoupon.php строка 538

◆ disableCheckCouponsUse()

disableCheckCouponsUse ( )
static

Disable checking use coupons for discount before multiuse add/update/delete.

Возвращает
void

См. определение в файле discountcoupon.php строка 436

◆ enableCheckCouponsUse()

enableCheckCouponsUse ( )
static

Enable checking use coupons for discount after multiuse add/update/delete.

Возвращает
void

См. определение в файле discountcoupon.php строка 446

◆ getCouponTypes()

getCouponTypes ( $extendedMode = false)
static

Returns coupon types list.

Аргументы
bool$extendedModeGet type ids or ids with title.
Возвращает
array

См. определение в файле discountcoupon.php строка 417

◆ getMap()

getMap ( )
static

Returns entity map definition.

Возвращает
array

См. определение в файле discountcoupon.php строка 82

◆ getTableName()

getTableName ( )
static

Returns DB table name for entity.

Возвращает
string

См. определение в файле discountcoupon.php строка 72

◆ isCheckedCouponsUse()

isCheckedCouponsUse ( )
static

Returns current checking use coupons mode.

Возвращает
bool

См. определение в файле discountcoupon.php строка 456

◆ isValidCouponType()

isValidCouponType ( $couponType)
static

Check valid coupon type.

Аргументы
int$couponTypeCoupon type.
Возвращает
bool

См. определение в файле discountcoupon.php строка 986

◆ onAfterAdd()

onAfterAdd ( Main\Entity\Event $event)
static

Default onAfterAdd handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for add.
Возвращает
void

См. определение в файле discountcoupon.php строка 302

◆ onAfterDelete()

onAfterDelete ( Main\Entity\Event $event)
static

Default onAfterDelete handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for delete.
Возвращает
void

См. определение в файле discountcoupon.php строка 406

◆ onAfterUpdate()

onAfterUpdate ( Main\Entity\Event $event)
static

Default onAfterUpdate handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for update.
Возвращает
void

См. определение в файле discountcoupon.php строка 373

◆ onBeforeAdd()

onBeforeAdd ( Main\Entity\Event $event)
static

Default onBeforeAdd handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for add.
Возвращает
Main\Entity\EventResult

См. определение в файле discountcoupon.php строка 280

◆ onBeforeUpdate()

onBeforeUpdate ( Main\Entity\Event $event)
static

Default onBeforeUpdate handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for update.
Возвращает
Main\Entity\EventResult

См. определение в файле discountcoupon.php строка 319

◆ onDelete()

onDelete ( Main\Entity\Event $event)
static

Default onDelete handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for delete.
Возвращает
void

См. определение в файле discountcoupon.php строка 384

◆ onUpdate()

onUpdate ( Main\Entity\Event $event)
static

Default onUpdate handler. Absolutely necessary.

Аргументы
Main\Entity\Event$eventCurrent data for update.
Возвращает
void

См. определение в файле discountcoupon.php строка 341

◆ prepareCouponData()

prepareCouponData ( & $fields)
static

Prepare coupon data. Only for admin list pages.

Аргументы
array&$fieldsCoupon data.
Возвращает
Main\Entity\Result

См. определение в файле discountcoupon.php строка 957

◆ saveApplied()

saveApplied ( $coupons,
$userId,
Main\Type\DateTime $currentTime )
static

Save coupons applyed info.

Аргументы
array$couponsCoupons list.
int$userIdUser id.
Main\Type\DateTime$currentTimeCurrent datetime.
Возвращает
array|bool

См. определение в файле discountcoupon.php строка 572

◆ setDiscountCheckList()

setDiscountCheckList ( $discountList)
static

Fill discount list for update use coupons flag.

Аргументы
array | int$discountListDiscount ids for check.
Возвращает
void

См. определение в файле discountcoupon.php строка 477

◆ setTimestamp()

setTimestamp ( array & $result,
array $data,
array $keys )
staticprotected

Fill datetime fields.

Аргументы
array&$resultModified data for add/update discount.
array$dataCurrent data for add/update discount.
array$keysList with checked keys (datetime info).
Возвращает
void

См. определение в файле discountcoupon.php строка 1033

◆ setUserID()

setUserID ( array & $result,
array $data,
array $keys )
staticprotected

Fill user id fields.

Аргументы
array&$resultModified data for add/update discount.
array$dataCurrent data for add/update discount.
array$keysList with checked keys (userId info).
Возвращает
void

@noinspection PhpMethodOrClassCallIsNotCaseSensitiveInspection

См. определение в файле discountcoupon.php строка 1004

◆ updateUseCoupons()

updateUseCoupons ( )
static

Update use coupon flag for discount list.

Возвращает
void

См. определение в файле discountcoupon.php строка 490

◆ validateCoupon()

validateCoupon ( )
static

Returns validators for COUPON field.

Возвращает
array

См. определение в файле discountcoupon.php строка 191

◆ validateDiscountId()

validateDiscountId ( )
static

Returns validators for DISCOUNT_ID field.

Возвращает
array

См. определение в файле discountcoupon.php строка 179

◆ validateType()

validateType ( )
static

Returns validators for TYPE field.

Возвращает
array

См. определение в файле discountcoupon.php строка 204

Поля

◆ $checkDiscountCouponsUse

$checkDiscountCouponsUse = 0
staticprotected

См. определение в файле discountcoupon.php строка 65

◆ $discountCheckList

$discountCheckList = array()
staticprotected

См. определение в файле discountcoupon.php строка 64

◆ EVENT_ON_AFTER_DELETE_DISCOUNT

const EVENT_ON_AFTER_DELETE_DISCOUNT = 'onAfterDeleteDiscountCoupons'

См. определение в файле discountcoupon.php строка 62

◆ EVENT_ON_GENERATE_COUPON

const EVENT_ON_GENERATE_COUPON = 'onGenerateCoupon'

См. определение в файле discountcoupon.php строка 61

◆ TYPE_ARCHIVED

const TYPE_ARCHIVED = 0x0008

См. определение в файле discountcoupon.php строка 59

◆ TYPE_BASKET_ROW

const TYPE_BASKET_ROW = 0x0001

См. определение в файле discountcoupon.php строка 56

◆ TYPE_MULTI_ORDER

const TYPE_MULTI_ORDER = 0x0004

См. определение в файле discountcoupon.php строка 58

◆ TYPE_ONE_ORDER

const TYPE_ONE_ORDER = 0x0002

См. определение в файле discountcoupon.php строка 57

◆ TYPE_UNKNOWN

const TYPE_UNKNOWN = 0x0000

См. определение в файле discountcoupon.php строка 55


Объявления и описания членов класса находятся в файле: