- Модуль: sender
- Путь к файлу: ~/bitrix/modules/sender/lib/integration/crm/connectors/helper.php
- Класс: Bitrix\Sender\Integration\Crm\Connectors\Helper
- Вызов: Helper::getPathToDetail
protected function getPathToDetail($entityTypeId, $entityId) { if (Loader::includeModule('crm')) { return Container::getInstance()->getRouter()->getItemDetailUrl($entityTypeId, $entityId); } switch ($entityTypeId) { case \CCrmOwnerType::Company: $optionName = 'path_to_company_details'; break; case \CCrmOwnerType::Contact: $optionName = 'path_to_contact_details'; break; case \CCrmOwnerType::Lead: $optionName = 'path_to_lead_details'; break; default: $optionName = null; } $url = $optionName ? Option::get('crm', $optionName) : null; if ($url) { $url = str_replace( ['#company_id#', '#contact_id#', '#lead_id#'], $entityId, $url ); } return $url; }