Пример #1
0
 private function action($place, $componentTemplate)
 {
     $dbSettings = $this->componentsService->findAllSettingList();
     $dbPositions = $this->componentsService->findAllPositionList($place);
     $dbComponents = $this->componentsService->findPlaceComponentList($place);
     $activeScheme = $this->componentsService->findSchemeByPlace($place);
     $schemeList = $this->componentsService->findSchemeList();
     if (empty($activeScheme) && !empty($schemeList)) {
         $activeScheme = reset($schemeList);
     }
     $componentPanel = new ADMIN_CMP_DragAndDropAdminPanel($place, $dbComponents, $componentTemplate);
     $componentPanel->setPositionList($dbPositions);
     $componentPanel->setSettingList($dbSettings);
     $componentPanel->setSchemeList($schemeList);
     if (!empty($activeScheme)) {
         $componentPanel->setScheme($activeScheme);
     }
     $this->assign('componentPanel', $componentPanel->render());
 }