• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/mobilecounter.php
  • Класс: BitrixPullMobileCounter
  • Вызов: MobileCounter::getConfig
static function getConfig($userId = null)
{
	if (is_null($userId) && is_object($GLOBALS['USER']))
	{
		$userId = $GLOBALS['USER']->getId();
	}

	$userId = intval($userId);
	if ($userId <= 0)
	{
		return false;
	}

	$types = Array();

	foreach (self::getTypes() as $type => $config)
	{
		$types[$type] = $config['DEFAULT'];
	}

	$options = CUserOptions::GetOption('pull', 'mobileCounterType', Array(), $userId);
	foreach ($options as $type => $default)
	{
		$types[$type] = $default;
	}

	return $types;
}