CEventCalendar::HandleElement: метод Битрикс
Постоянная ссылка: http://bxapi.ru/src/?id=185669
// CEventCalendar::HandleElement()
// /bitrix/modules/intranet/classes/general/event_calendar.php:1622
function HandleElement(&$res, $arItem, $arPeriodic = false, $bJS = false, $bSuperposed = false)
{
$arEvent = array(
'ID' => intVal($arItem['ID']),
'IBLOCK_ID' => intVal($arItem['IBLOCK_ID']),
'IBLOCK_SECTION_ID' => intVal($arItem['IBLOCK_SECTION_ID']),
'NAME' => htmlspecialcharsex($arItem['~NAME']),
'DATE_FROM' => cutZeroTime($arItem['DISPLAY_ACTIVE_FROM']),
'DATE_TO' => cutZeroTime($arItem['DISPLAY_ACTIVE_TO']),
'DETAIL_TEXT' => $arItem['DETAIL_TEXT'],
'PERIOD' => $arPeriodic,
'TIMESTAMP_X' => $arItem['TIMESTAMP_X'],
'DATE_CREATE' => $arItem['DATE_CREATE'],
'GUESTS' => $arItem['GUESTS'],
'CREATED_BY' => $arItem['CREATED_BY'],
'STATUS' => $arItem['STATUS'],
'HOST' => $arItem['HOST'],
'REMIND' => $arItem['REMIND'],
'IMPORTANCE' => $arItem['IMPORTANCE'] ? $arItem['IMPORTANCE'] : 'normal',
'ACCESSIBILITY' => $arItem['ACCESSIBILITY'],
'PRIVATE' => $arItem['PRIVATE'],
'VERSION' => $arItem['VERSION'],
'MEETING_TEXT' => htmlspecialcharsex(addslashes($arItem['MEETING_TEXT'])),
'IS_MEETING' => $arItem['IS_MEETING'],
//'LOCATION' => htmlspecialcharsex($arItem['LOCATION'])
'LOCATION' => $arItem['LOCATION']
);
$rsUser = CUser::GetByID($arItem['CREATED_BY']);
if ($arUser = $rsUser->Fetch())
{
$url = str_replace('#USER_ID#', $arUser["ID"], COption::GetOptionString('intranet', 'path_user', '/company/personal/user/#USER_ID#/'));
$arEvent['CREATED_BY_NAME_LINK'] = ''.CUser::FormatName(CSite::GetNameFormat(), $arUser).'';
}
if ($bSuperposed)
$arEvent['bSuperposed'] = true;
if ($bJS)
$res .= CUtil::PhpToJSObject($arEvent).",";
else
$res[] = $arEvent;
}