• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/task.php
  • Класс: CTasks
  • Вызов: CTasks::getViewedBy
static function getViewedBy($filter, $defaultValue)
{
	$viewedBy = $defaultValue;

	if (
		array_key_exists('::SUBFILTER-PROBLEM', $filter)
		&& array_key_exists('VIEWED_BY', $filter['::SUBFILTER-PROBLEM'])
		&& intval($filter['::SUBFILTER-PROBLEM']['VIEWED_BY'])
	)
	{
		$viewedBy = intval($filter['::SUBFILTER-PROBLEM']['VIEWED_BY']);
	}
	elseif (array_key_exists('VIEWED_BY', $filter) && intval($filter['VIEWED_BY']))
	{
		$viewedBy = intval($filter['VIEWED_BY']);
	}

	return $viewedBy;
}