• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/sender/mail/consentbuildermail.php
  • Класс: Bitrix\Sender\Integration\Sender\Mail\ConsentBuilderMail
  • Вызов: ConsentBuilderMail::buildLink
static function buildLink($fields, $siteId, $type): string
{
	$tag = Consent::encodeTag($fields);
	$dir = static::getLink($siteId);
	switch ($type)
	{
		case static::APPLY:
			$result = $dir . '?' . static::buildQuery(['consent' => 'apply', 'type' => static::CODE, 'tag' => $tag]);
			break;
		case static::REJECT:
			$result = $dir . '?' . static::buildQuery(['consent' => 'reject', 'type' => static::CODE, 'tag' => $tag]);
			break;
		default:
			throw new \InvalidArgumentException("Type is out of range");
	}
	return $result;
}