CBPVirtualDocument::getAllowableUserGroups

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPVirtualDocument
  4. getAllowableUserGroups
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/virtualdocument.php
  • Класс: CBPVirtualDocument
  • Вызов: CBPVirtualDocument::getAllowableUserGroups
static function getAllowableUserGroups($documentType, $withExtended = false)
{
	$documentType = trim($documentType);
	if ($documentType == '')
		return false;

	$iblockId = intval(mb_substr($documentType, mb_strlen("type_")));

	$arResult = array("Author" => GetMessage("BPVDX_DOCUMENT_AUTHOR"));

//		$arRes = array(1);
//		$arGroups = CIBlock::GetGroupPermissions($iblockId);
//		foreach ($arGroups as $groupId => $perm)
//		{
//			if ($perm > "R")
//				$arRes[] = $groupId;
//		}

	$dbGroupsList = CGroup::GetListEx(array("NAME" => "ASC"), array("ACTIVE" => "Y"));	//array("ID" => $arRes)
	while ($arGroup = $dbGroupsList->Fetch())
		$arResult[$arGroup["ID"]] = $arGroup["NAME"];

	return $arResult;
}

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