- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_event.php
- Класс: CCalendarEvent
- Вызов: CCalendarEvent::getEventForEditInterface
static function getEventForEditInterface($entryId, $params = [])
{
$entry = self::GetList(
[
'arFilter' => [
"ID" => $entryId,
"DELETED" => "N",
"FROM_LIMIT" => $params['eventDate'] ?? null,
"TO_LIMIT" => $params['eventDate'] ?? null,
],
'parseRecursion' => true,
'maxInstanceCount' => 1,
'preciseLimits' => true,
'fetchAttendees' => true,
'checkPermissions' => true,
'setDefaultLimit' => false
]
);
if (!$entry || !is_array($entry[0]))
{
$entry = self::GetList(
[
'arFilter' => [
"ID" => $entryId,
"DELETED" => "N"
],
'parseRecursion' => true,
'maxInstanceCount' => 1,
'fetchAttendees' => true,
'checkPermissions' => true,
'setDefaultLimit' => false
]
);
}
// Here we can get events with wrong RRULE ('parseRecursion' => false)
if (!$entry || !is_array($entry[0]))
{
$entry = self::GetList(
[
'arFilter' => [
"ID" => $entryId,
"DELETED" => "N"
],
'parseRecursion' => false,
'fetchAttendees' => true,
'checkPermissions' => true,
'setDefaultLimit' => false
]
);
}
$entry = is_array($entry) ? $entry[0] : null;
if (is_array($entry) && $entry['ID'] !== $entry['PARENT_ID'])
{
return self::getEventForEditInterface($entry['PARENT_ID'], $params);
}
return $entry;
}