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

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

static getTableName ()
static getMap ()
static validateNeedSending ()
static validateSiteId ()
static onUserDelete ($userId)
static onIblockElementDelete ($productId)
static getContactTypes ()
static onAddContactType (&$contactTypes)
static onProductUpdate ($productId, $fields)
static onProductSetAvailableUpdate ($productId, $fields)
static runAgentToSendNotice ($productId)
static runAgentToSendRepeatedNotice ($productId)
static checkPermissionSubscribe ($subscribe)
static setOldProductAvailable ($productId, $available)
static sendNotice ()
static sendRepeatedNotice ()

Поля данных

const EVENT_ADD_CONTACT_TYPE = 'onAddContactType'
const CONTACT_TYPE_EMAIL = 1
const LIMIT_SEND = 50
const AGENT_TIME_OUT = 10
const AGENT_INTERVAL = 10

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

static checkOldProductAvailable ($productId, $fields)
static checkLastUpdate ()
static getSubscriptionsData ()
static prepareDataForNotice (array $listSubscribe, $eventName)
static startEventNotification (array $dataSendToNotice)

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

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

Методы

◆ checkLastUpdate()

checkLastUpdate ( )
staticprotected

Return true, if the last update products was completed less than self::AGENT_TIME_OUT seconds ago.

Возвращает
bool

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

◆ checkOldProductAvailable()

checkOldProductAvailable ( $productId,
$fields )
staticprotected

The method checks the old and new product availability.

Аргументы
integer$productIdId product.
array$fieldsAn array of event data.
Возвращает
bool

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

◆ checkPermissionSubscribe()

checkPermissionSubscribe ( $subscribe)
static

The method checks permission the subscription for the product.

Аргументы
string$subscribeThe field value SUBSCRIBE of the product.
Возвращает
bool
Исключения

Bitrix\Main\ArgumentNullException

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

◆ getContactTypes()

getContactTypes ( )
static

The method returns an array of available types and allows you to add a type using an event. When you add a new type of need to add a 'RULE' to validate the field 'USER_CONTACT'. And also a function that will send messages to the specified type.

Возвращает
array array(typeId=>array(ID => typeId, NAME => typeName, RULE => validateRule, HANDLER => function())).

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

◆ getMap()

getMap ( )
static

Returns entity map definition.

Возвращает
array

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

◆ getSubscriptionsData()

getSubscriptionsData ( )
staticprotected

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

◆ getTableName()

getTableName ( )
static

Returns DB table name for entity.

Возвращает
string

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

◆ onAddContactType()

onAddContactType ( & $contactTypes)
static

Handler onAddContactType. Adding a new contact type.

Аргументы
array&$contactTypesContact type.
Возвращает
void

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

◆ onIblockElementDelete()

onIblockElementDelete ( $productId)
static

Handler onIblockElementDelete for delete the data on the subscription in case of removal of product.

Аргументы
integer$productIdId product.
Возвращает
bool

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

◆ onProductSetAvailableUpdate()

onProductSetAvailableUpdate ( $productId,
$fields )
static

Method OnProductSetAvailableUpdate for send a notification to subscribers about positive change available.

Аргументы
integer$productIdId product.
array$fieldsAn array of event data.
Возвращает
bool

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

◆ onProductUpdate()

onProductUpdate ( $productId,
$fields )
static
Аргументы
integer$productIdId product.
array$fieldsAn array of event data.
Возвращает
bool

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

◆ onUserDelete()

onUserDelete ( $userId)
static

Handler onUserDelete for change subscription data when removing a user.

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

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

◆ prepareDataForNotice()

prepareDataForNotice ( array $listSubscribe,
$eventName )
staticprotected

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

◆ runAgentToSendNotice()

runAgentToSendNotice ( $productId)
static

The method runs the agent to send notifications to subscribers.

Аргументы
integer$productIdId product.
Возвращает
bool

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

◆ runAgentToSendRepeatedNotice()

runAgentToSendRepeatedNotice ( $productId)
static

The method runs the agent to send repeated notifications to subscribers.

Аргументы
integer$productIdId product.
Возвращает
bool

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

◆ sendNotice()

sendNotice ( )
static

Agent function. Get the necessary data and send notifications to users.

Возвращает
string

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

◆ sendRepeatedNotice()

sendRepeatedNotice ( )
static

Agent function. Get the necessary data and send notifications to users.

Возвращает
string

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

◆ setOldProductAvailable()

setOldProductAvailable ( $productId,
$available )
static

The method stores the value of availability of product before updating.

Аргументы
integer$productIdProduct id.
string$availableThe field value AVAILABLE of the product.
Возвращает
bool

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

◆ startEventNotification()

startEventNotification ( array $dataSendToNotice)
staticprotected

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

◆ validateNeedSending()

validateNeedSending ( )
static

Returns validators for NEED_SENDING field.

Возвращает
array

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

◆ validateSiteId()

validateSiteId ( )
static

Returns validators for SITE_ID field.

Возвращает
array

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

Поля

◆ AGENT_INTERVAL

const AGENT_INTERVAL = 10

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

◆ AGENT_TIME_OUT

const AGENT_TIME_OUT = 10

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

◆ CONTACT_TYPE_EMAIL

const CONTACT_TYPE_EMAIL = 1

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

◆ EVENT_ADD_CONTACT_TYPE

const EVENT_ADD_CONTACT_TYPE = 'onAddContactType'

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

◆ LIMIT_SEND

const LIMIT_SEND = 50

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


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