- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/ui/selector/entities.php
- Класс: BitrixMainUISelectorEntities
- Вызов: Entities::getEntityType
static function getEntityType($params)
{
if (
empty($params)
|| empty($params['itemCode'])
)
{
return false;
}
$result = false;
$itemCode = $params['itemCode'];
if (preg_match(self::CODE_USER_REGEX, $itemCode, $matches))
{
$result = 'users';
}
elseif (preg_match(self::CODE_SONETGROUP_REGEX, $itemCode, $matches))
{
$result = 'sonetgroups';
}
elseif (
preg_match(self::CODE_DEPT_REGEX, $itemCode, $matches)
|| preg_match(self::CODE_DEPTR_REGEX, $itemCode, $matches)
)
{
$result = 'department';
}
elseif (
preg_match(self::CODE_USERALL_REGEX, $itemCode, $matches)
|| preg_match(self::CODE_USERMANAGER_REGEX, $itemCode, $matches)
|| preg_match(self::CODE_GROUP_REGEX, $itemCode, $matches)
)
{
$result = 'groups';
}
return $result;
}