ResourceBooking::getBitrx24Limitation

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. ResourceBooking
  4. getBitrx24Limitation
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/userfield/resourcebooking.php
  • Класс: BitrixCalendarUserFieldResourceBooking
  • Вызов: ResourceBooking::getBitrx24Limitation
static function getBitrx24Limitation()
{
	$limit = -1;
	if (BitrixMainLoader::includeModule('bitrix24'))
	{
		$b24limit = Bitrix24Feature::getVariable('calendar_resourcebooking_limit');
		if ($b24limit !== null)
		{
			return $b24limit;
		}

		//else: fallback
		$licenseType = CBitrix24::getLicenseType();

		if ($licenseType === 'project' || $licenseType === 'self')
		{
			$limit = 6;
		}
		elseif ($licenseType === 'tf' || $licenseType === 'retail')
		{
			$limit = 12;
		}
		elseif ($licenseType === 'team' || $licenseType === 'start_2019')
		{
			$limit = 24;
		}
	}

	return $limit;
}

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