30 $sectionId =
$params[
'sectionId'];
33 if ($sectionId && self::$sectionIndex[$sectionId])
35 $sectionList[] = self::$sectionIndex[$sectionId];
39 if ($sectionId !== \CCalendar::TASK_SECTION_ID)
42 'CAL_TYPE' => $entityType,
56 \CCalendar::SetSilentErrorMode(
true);
62 $res = \CCalendarSect::GetList([
'arFilter' =>
$filter]);
63 \CCalendar::SetSilentErrorMode(
false);
65 foreach(
$res as $calendar)
67 if (
$params[
'skipExchange'] ==
true && $calendar[
'DAV_EXCH_CAL'] <>
'')
73 'ID' => $calendar[
'ID'],
74 '~NAME' => $calendar[
'NAME'],
78 $sectionList[] = $section;
79 self::$sectionIndex[$section[
'ID']] = $section;
83 if (!$sectionId &&
false)
86 if (
count($followedSectionIdList) > 0)
88 $followedSectionList = \CCalendarSect::GetList([
'arFilter' => [
89 'CAL_TYPE' => $entityType,
92 'ADDITIONAL_IDS' => $followedSectionIdList
95 foreach($followedSectionList as $calendar)
98 'ID' => $calendar[
'ID'],
99 '~NAME' => $calendar[
'NAME'],
103 $sectionList[] = $section;
104 self::$sectionIndex[$section[
'ID']] = $section;
113 $taskSectionTitle = (isset($sectionsUserData[
'tasks']) && !empty($sectionsUserData[
'tasks'][
'name']))
114 ? $sectionsUserData[
'tasks'][
'name']
118 'ID' => \CCalendar::TASK_SECTION_ID,
119 '~NAME' => $taskSectionTitle,
121 'COLOR' => (isset($sectionsUserData[
'tasks']) && !empty($sectionsUserData[
'tasks'][
'color'])) ?
122 htmlspecialcharsbx($sectionsUserData[
'tasks'][
'color']) : \CCalendar::DEFAULT_TASK_COLOR
124 $sectionList[] = $section;
125 self::$sectionIndex[$section[
'ID']] = $section;