97 && Loader::includeModule(
'iblock'))
100 $cacheId =
'sonet_group_photo_iblock_'.SITE_ID;
101 $cacheDir =
'/bitrix/sonet_group_photo_iblock';
102 $cache = new \CPHPCache;
104 if($cache->initCache($ttl, $cacheId, $cacheDir))
106 $cacheData = $cache->getVars();
107 $componentParams[
'PHOTO_GROUP_IBLOCK_TYPE'] = $cacheData[
'PHOTO_GROUP_IBLOCK_TYPE'];
108 $componentParams[
'PHOTO_GROUP_IBLOCK_ID'] = $cacheData[
'PHOTO_GROUP_IBLOCK_ID'];
113 $res = \CIBlockType::getById(
'photos');
114 if ($IBlockTypeFields =
$res->fetch())
116 $resIBlock = \CIBlock::getList(
119 'IBLOCK_TYPE' => $IBlockTypeFields[
'ID'],
120 'CODE' => [
'group_photogallery',
'group_photogallery_'.
SITE_ID ],
125 if ($IBlockFields = $resIBlock->fetch())
127 $componentParams[
'PHOTO_GROUP_IBLOCK_TYPE'] = $IBlockFields[
'IBLOCK_TYPE_ID'];
132 if ($cache->startDataCache())
134 $cache->endDataCache([