• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/restriction/manager.php
  • Класс: BitrixLandingRestrictionManager
  • Вызов: Manager::isAllowed
static function isAllowed(string $code, array $params = [], string $cacheSalt = ''): bool
{
	static $cache = [];
	if (
		isset(self::$tmpFeatures[$code]) &&
		self::$tmpFeatures[$code]
	)
	{
		return true;
	}

	$cacheCode = $code . ($cacheSalt ? '_' : '') . $cacheSalt;

	if (array_key_exists($cacheCode, $cache))
	{
		return $cache[$cacheCode];
	}

	if ($mapItem = self::getMapItem($code))
	{
		$cache[$cacheCode] = call_user_func_array($mapItem['check_callback'], [$mapItem['code'], $params]);
		return $cache[$cacheCode];
	}

	return true;
}