- Модуль: catalogmobile
- Путь к файлу: ~/bitrix/modules/catalogmobile/lib/RealizationList/Item.php
- Класс: Bitrix\CatalogMobile\RealizationList\Item
- Вызов: Item::prepareResponsible
private function prepareResponsible(array &$document): void
{
if (isset($document['RESPONSIBLE_BY_ID']))
{
if (!isset($document['USER_INFO']))
{
$document['USER_INFO'] = [];
}
$userId = $document['RESPONSIBLE_BY_ID'];
$document['USER_INFO'][$userId] = [
'ID' => $userId,
'LOGIN' => $document['RESPONSIBLE_BY_LOGIN'],
'NAME' => $document['RESPONSIBLE_BY_NAME'],
'LAST_NAME' => $document['RESPONSIBLE_BY_LAST_NAME'],
'SECOND_NAME' => $document['RESPONSIBLE_BY_SECOND_NAME'],
'PERSONAL_PHOTO' => $document['RESPONSIBLE_BY_PERSONAL_PHOTO'],
];
unset(
$document['RESPONSIBLE_BY_ID'],
$document['RESPONSIBLE_BY_LOGIN'],
$document['RESPONSIBLE_BY_NAME'],
$document['RESPONSIBLE_BY_LAST_NAME'],
$document['RESPONSIBLE_BY_SECOND_NAME'],
$document['RESPONSIBLE_BY_PERSONAL_PHOTO'],
);
}
}