5use \Bitrix\Crm\Requisite\EntityLink;
6use \Bitrix\Landing\Block;
7use \Bitrix\Main\Loader;
8use \Bitrix\SalesCenter\Integration\CrmManager;
58 $content = preg_replace_callback(
59 '/#(PHONE|EMAIL)([\d]+)#/',
60 static function ($matches) use ($phones, $emails)
63 $sources = ($matches[1] ===
'PHONE') ? $phones : $emails;
65 return $sources[$key] ?? $sources[0];
71 if (mb_strpos($content,
'#COMPANY#') !==
false)
73 $content = str_replace(
'#COMPANY#', $company, $content);
97 !Loader::includeModule(
'crm')
98 || !Loader::includeModule(
'salescenter')
105 if (EntityLink::getDefaultMyCompanyId() === 0)
114 $phones = CrmManager::getPublishedCompanyPhone();
117 : [$phones[
'VALUE']];
119 $emails = CrmManager::getPublishedCompanyEmail();
122 : [$emails[
'VALUE']];
save(array $additionalFields=[])
saveContent(string $content, $designed=false)