TriggerCampaign::getDontAuth

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. TriggerCampaign
  4. getDontAuth
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/sale/preset/triggercampaign.php
  • Класс: Bitrix\Sender\Integration\Sale\Preset\TriggerCampaign
  • Вызов: TriggerCampaign::getDontAuth
static function getDontAuth($days)
{
	$list = array(
		'TYPE' => Loc::getMessage('PRESET_TYPE_ORDER'),
		'CODE' => 'sale_user_dontauth',
		'NAME' => Loc::getMessage('PRESET_DONT_AUTH_NAME'),
		'DESC_USER' => Loc::getMessage('PRESET_DONT_AUTH_DESC_USER'),
		'DESC' => Loc::getMessage('PRESET_DONT_AUTH_DESC', array('%DAYS%' => $days)),
		'TRIGGER' => array(
			'START' => array(
				'ENDPOINT' => array(
					'MODULE_ID' => 'sender',
					'CODE' => 'user_dontauth',
					'FIELDS' => array('DAYS_DONT_AUTH' => $days)
				)
			),
			'END' => array(
				'ENDPOINT' => array(
					'MODULE_ID' => 'sender',
					'CODE' => 'user_auth',
					'FIELDS' => array()
				)
			),
		),
		'CHAIN' => array(
			array(
				'TIME_SHIFT' => 0,
				'SUBJECT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_1_SUBJECT'),
				'MESSAGE' => self::getMailTemplate(array(
					'TITLE' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_1_SUBJECT'),
					'TEXT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_1_MESSAGE', static::getMessagePlaceHolders()),
				)),
			),
			array(
				'TIME_SHIFT' => 1440,
				'SUBJECT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_2_SUBJECT'),
				'MESSAGE' => self::getMailTemplate(array(
					'TITLE' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_2_SUBJECT'),
					'TEXT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_2_MESSAGE', static::getMessagePlaceHolders()),
				)),
			),
			array(
				'TIME_SHIFT' => 1440,
				'SUBJECT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_3_SUBJECT'),
				'MESSAGE' => self::getMailTemplate(array(
					'TITLE' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_3_SUBJECT'),
					'TEXT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_3_MESSAGE', static::getMessagePlaceHolders()),
				)),
			),
			array(
				'TIME_SHIFT' => 1440,
				'SUBJECT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_4_SUBJECT'),
				'MESSAGE' => self::getMailTemplate(array(
					'TITLE' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_4_SUBJECT'),
					'TEXT' => Loc::getMessage('PRESET_DONT_AUTH_LETTER_4_MESSAGE', static::getMessagePlaceHolders()),
				)),
			),
		)
	);

	foreach ($list['CHAIN'] as $index => $letter)
	{
		$letter['TEMPLATE_TYPE'] = Sender\Templates\Type::getCode(Sender\Templates\Type::BASE);
		$letter['TEMPLATE_ID'] = mb_strtoupper($list['CODE']).'_' . $index;
		$list['CHAIN'][$index] = $letter;
	}

	return $list;
}

Добавить комментарий