CBPVirtualDocument :: GetAllowableUserGroups: Bitrix method

      
<?php 
//  CBPVirtualDocument :: GetAllowableUserGroups()
//  /dist/bitrix/modules/bizproc/classes/general/virtualdocument.php:2016

    
public function GetAllowableUserGroups($documentType$withExtended false)
    {
        
$documentType trim($documentType);
        if (
strlen($documentType) <= 0)
            return 
false;

        
$iblockId intval(substr($documentTypestrlen("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;
    }