...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_activity.php
- Класс: \CAllCrmActivity
- Вызов: CAllCrmActivity::ExtractUrnFromMessage
static function ExtractUrnFromMessage(&$messageData, $codeAllocation = false) { if(!is_array($messageData) || empty($messageData)) { return ''; } if($codeAllocation === false) { $codeAllocation = CCrmEMailCodeAllocation::GetCurrent(); } $subject = isset($messageData['SUBJECT']) ? $messageData['SUBJECT'] : ''; $body = isset($messageData['BODY']) ? $messageData['BODY'] : ''; $result = ''; if($codeAllocation === CCrmEMailCodeAllocation::Subject) { $result = CCrmActivity::ExtractUrnFromSubject($subject); if($result === '') { $result = CCrmActivity::ExtractUrnFromBody($body); } } elseif($codeAllocation === CCrmEMailCodeAllocation::Body) { $result = CCrmActivity::ExtractUrnFromBody($body); if($result === '') { $result = CCrmActivity::ExtractUrnFromSubject($subject); } } return $result; }