CBPViewHelper::joinUsersToTasks

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPViewHelper
  4. joinUsersToTasks
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/viewhelper.php
  • Класс: CBPViewHelper
  • Вызов: CBPViewHelper::joinUsersToTasks
static function joinUsersToTasks(&$tasks, &$taskUsers, $extendUserInfo = false)
{
	$allUsers = array();
	foreach ($tasks as &$t)
	{
		$t['USERS'] = array();
		$t['USERS_CNT'] = 0;
		if (isset($taskUsers[$t['ID']]))
		{
			foreach ($taskUsers[$t['ID']] as $u)
			{
				if ($extendUserInfo)
				{
					if (empty($u['FULL_NAME']))
						$u['FULL_NAME'] = self::getUserFullName($u);
					if (empty($u['PHOTO_SRC']))
						$u['PHOTO_SRC'] = self::getUserPhotoSrc($u);
				}
				$t['USERS'][] = $u;
				$t['USERS_CNT'] = sizeof($t['USERS']);
				$allUsers[] = $u;
			}
		}
	}
	return $allUsers;
}

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