...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_role.php
- Класс: \CCrmRole
- Вызов: CCrmRole::GetRolePerms
public function GetRolePerms($ID) { global $DB; $ID = (int)$ID; $sSql = 'SELECT * FROM b_crm_role_perms WHERE role_id = '.$ID; $obRes = $DB->Query($sSql, false, 'FILE: '.__FILE__.'
LINE: '.__LINE__); $_arResult = array(); while ($arRow = $obRes->Fetch()) { if (!isset($arResult[$arRow['ENTITY']][$arRow['PERM_TYPE']])) if ($arRow['FIELD'] != '-') $_arResult[$arRow['ENTITY']][$arRow['PERM_TYPE']][$arRow['FIELD']][$arRow['FIELD_VALUE']] = trim($arRow['ATTR']); else $_arResult[$arRow['ENTITY']][$arRow['PERM_TYPE']][$arRow['FIELD']] = trim($arRow['ATTR']); } return $_arResult; }