• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/subscribe.php
  • Класс: BitrixCatalogSubscribeTable
  • Вызов: SubscribeTable::sendNotice
static function sendNotice()
{
	if(static::checkLastUpdate())
		return 'BitrixCatalogSubscribeTable::sendNotice();';

	list($listSubscribe, $totalCount) = static::getSubscriptionsData();

	if(empty($listSubscribe))
	{
		static::$agentNoticeCreated = false;
		return '';
	}

	$anotherStep = (int)$totalCount['CNT'] > static::LIMIT_SEND;

	list($dataSendToNotice, $listNotifiedSubscribeId) =
		static::prepareDataForNotice($listSubscribe, 'CATALOG_PRODUCT_SUBSCRIBE_NOTIFY');

	static::startEventNotification($dataSendToNotice);

	if($listNotifiedSubscribeId)
		static::setNeedSending($listNotifiedSubscribeId);

	if($anotherStep)
	{
		return 'BitrixCatalogSubscribeTable::sendNotice();';
	}
	else
	{
		static::$agentNoticeCreated = false;
		return '';
	}
}