- Модуль: socialnetwork
- Путь к файлу: ~/bitrix/modules/socialnetwork/lib/componenthelper.php
- Класс: BitrixSocialnetworkComponentHelper
- Вызов: ComponentHelper::checkTooltipComponentParams
static function checkTooltipComponentParams($params): array
{
if (ModuleManager::isModuleInstalled('intranet'))
{
$defaultFields = [
'EMAIL',
'PERSONAL_MOBILE',
'WORK_PHONE',
'PERSONAL_ICQ',
'PERSONAL_PHOTO',
'PERSONAL_CITY',
'WORK_COMPANY',
'WORK_POSITION',
];
$defaultProperties = [
'UF_DEPARTMENT',
'UF_PHONE_INNER',
];
}
else
{
$defaultFields = [
"PERSONAL_ICQ",
"PERSONAL_BIRTHDAY",
"PERSONAL_PHOTO",
"PERSONAL_CITY",
"WORK_COMPANY",
"WORK_POSITION"
];
$defaultProperties = [];
}
return [
'SHOW_FIELDS_TOOLTIP' => ($params['SHOW_FIELDS_TOOLTIP'] ?? unserialize(Option::get('socialnetwork', 'tooltip_fields', serialize($defaultFields)), ['allowed_classes' => false])),
'USER_PROPERTY_TOOLTIP' => ($params['USER_PROPERTY_TOOLTIP'] ?? unserialize(Option::get('socialnetwork', 'tooltip_properties', serialize($defaultProperties)), ['allowed_classes' => false])),
];
}