CCrmPerms::GetEntityRelations

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmPerms
  4. GetEntityRelations
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_perms.php
  • Класс: \CCrmPerms
  • Вызов: CCrmPerms::GetEntityRelations
static function GetEntityRelations($permEntity, $permAttr = self::PERM_NONE, $permType = 'READ')
{
	global $DB;

	$arResult = array();
	$arRole = CCrmRole::GetRoleByAttr($permEntity, $permAttr, $permType);

	if (!empty($arRole))
	{
		$sSql = 'SELECT RELATION FROM b_crm_role_relation WHERE ROLE_ID IN ('.implode(',', $arRole).')';
		$res = $DB->Query($sSql, false, 'FILE: '.__FILE__.'
LINE: '.__LINE__); while($row = $res->Fetch()) $arResult[] = $row['RELATION']; } return $arResult; }

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