- Модуль: intranet
- Путь к файлу: ~/bitrix/modules/intranet/classes/general/event_calendar.php
- Класс: CEventCalendar
- Вызов: CEventCalendar::GetCalendarsEx
function GetCalendarsEx($sectionId = false, $iblockId = false, $bOwner = true, $bDontCache = false)
{
if ($iblockId === false)
$iblockId = $this->iblockId;
if ($bOwner === true)
$bOwner = $this->bOwner;
if ($sectionId === false)
$sectionId = $this->GetSectionId();
$bCache = $bDontCache ? false : $this->bCache;
if ($bCache)
{
$cache = new CPHPCache;
$key = $bOwner ? $this->ownerId: 0;
$cacheId = serialize(array($iblockId, $key, $sectionId));
$cachePath = $this->cachePath.$iblockId."/calendars/".$key."/";
if ($cache->InitCache($this->cacheTime, $cacheId, $cachePath))
{
$res = $cache->GetVars();
$arCalendars = $res['arCalendars'];
$this->arCalenderIndex = $res['arCalenderIndex'];
}
}
if (!$bCache || empty($arCalendars))
{
$arCalendars = $this->GetCalendars(array('sectionId' => $sectionId, 'iblockId' => $iblockId, 'bOwner' => $bOwner));
if ($bCache)
{
$cache->StartDataCache($this->cacheTime, $cacheId, $cachePath);
$cache->EndDataCache(array(
"arCalendars" => $arCalendars,
"arCalenderIndex" => $this->arCalenderIndex
));
}
}
if ($iblockId == $this->iblockId)
$this->arCalendars = $arCalendars;
return $arCalendars;
}