Esempio n. 1
0
 private function fetchFromCache()
 {
     $place = BOL_ComponentAdminService::PLACE_INDEX;
     $state = $this->service->findCache($place);
     if (empty($state)) {
         $this->componentList = $this->service->findSectionComponentList($place, 'sidebar');
         $this->positionList = $this->service->findSectionPositionList($place, 'sidebar');
         $this->settingList = $this->service->findSettingListByComponentPlaceList($this->componentList);
         return;
     }
     foreach ($state['defaultPositions'] as $key => $item) {
         if ($item['section'] == 'sidebar') {
             $this->positionList[$key] = $item;
             $this->componentList[$key] = $state['defaultComponents'][$key];
             if (!empty($state['defaultSettings'][$key])) {
                 $this->settingList[$key] = $state['defaultSettings'][$key];
             }
         }
     }
 }