Form::onBitrix24LicenseChange

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Form
  4. onBitrix24LicenseChange
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/webform/form.php
  • Класс: Bitrix\Crm\WebForm\Form
  • Вызов: Form::onBitrix24LicenseChange
static function onBitrix24LicenseChange(\Bitrix\Main\Event $event)
{
	preg_match("/(project|tf|team)$/is", $event->getParameter(0), $matches);
	$licenseType = mb_strtolower($matches[0]);
	if ($licenseType)
	{
		$maxActivated = null;
		switch($licenseType)
		{
			case 'project':
				$maxActivated = 1;
				break;
			case 'tf':
				$maxActivated = 2;
				break;
			case 'team':
				$maxActivated = 4;
				break;
			case 'demo':
				$maxActivated = 9999;
				break;
		}

		self::actualizeFormsActiveState($maxActivated);
	}
}

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