Provider::fillIsExtranet

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Provider
  4. fillIsExtranet
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/project/provider.php
  • Класс: BitrixTasksInternalsProjectProvider
  • Вызов: Provider::fillIsExtranet
public function fillIsExtranet(array $projects): array
{
	$projectIds = array_keys($projects);

	foreach ($projectIds as $id)
	{
		$projects[$id]['IS_EXTRANET'] = 'N';
	}

	if (!Loader::includeModule('extranet'))
	{
		return $projects;
	}

	$sites = [];
	$projectsSiteIdsResult = CSocNetGroup::GetSite($projectIds);
	while ($site = $projectsSiteIdsResult->Fetch())
	{
		$sites[$site['GROUP_ID']][$site['LID']] = true;
	}

	$extranetSiteId = CExtranet::GetExtranetSiteID();
	foreach ($projectIds as $id)
	{
		$projects[$id]['IS_EXTRANET'] = isset($sites[$id][$extranetSiteId]);
	}

	return $projects;
}

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