- Модуль: socialnetwork
- Путь к файлу: ~/bitrix/modules/socialnetwork/lib/integration/ui/entityselector/metauserprovider.php
- Класс: BitrixSocialnetworkIntegrationUIEntitySelectorMetaUserProvider
- Вызов: MetaUserProvider::getMetaUserItem
static function getMetaUserItem(string $id, array $options = []): Item
{
$title = isset($options['title']) && is_string($options['title']) ? $options['title'] : '';
if (empty($title))
{
$title = self::getTitle($id);
}
$deselectable =
isset($options['deselectable']) && is_bool($options['deselectable']) ? $options['deselectable'] : true
;
$searchable =
isset($options['searchable']) && is_bool($options['searchable']) ? $options['searchable'] : false
;
$availableInRecentTab =
isset($options['availableInRecentTab']) && is_bool($options['availableInRecentTab'])
? $options['availableInRecentTab']
: true
;
$sort = isset($options['sort']) && is_numeric($options['sort']) ? (int)$options['sort'] : 1;
return new Item([
'id' => $id,
'entityId' => 'meta-user',
'entityType' => $id,
'title' => $title,
'searchable' => $searchable,
'saveable' => false,
'deselectable' => $deselectable,
'availableInRecentTab' => $availableInRecentTab,
'sort' => $sort,
]);
}