• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_notify.php
  • Класс: CIMNotify
  • Вызов: CIMNotify::GetNotifyCounter
public function GetNotifyCounter($arNotify = Array())
{
	$count = 0;
	if (isset($arNotify['unreadNotify']) && !empty($arNotify['unreadNotify']) && isset($arNotify['notify']))
	{
		foreach ($arNotify['unreadNotify'] as $key => $value)
		{
			if (!isset($arNotify['notify'][$key]))
				continue;

			$count++;
		}
	}
	else
	{
		$cache = CIMMessenger::SpeedFileGet($this->user_id, IM_SPEED_NOTIFY);
		$count = $cache? $cache['counter']: 0;
	}
	return intval($count);
}