示例#1
0
文件: admin.php 项目: vazahat/dudex
 public function panel()
 {
     $componentService = BOL_ComponentAdminService::getInstance();
     $this->setPageHeading(OW::getLanguage()->text('groups', 'widgets_panel_heading'));
     $this->setPageHeadingIconClass('ow_ic_dashboard');
     $place = GROUPS_BOL_Service::WIDGET_PANEL_NAME;
     $dbSettings = $componentService->findAllSettingList();
     $dbPositions = $componentService->findAllPositionList($place);
     $dbComponents = $componentService->findPlaceComponentList($place);
     $activeScheme = $componentService->findSchemeByPlace($place);
     $schemeList = $componentService->findSchemeList();
     if (empty($activeScheme) && !empty($schemeList)) {
         $activeScheme = reset($schemeList);
     }
     $componentPanel = new ADMIN_CMP_DragAndDropAdminPanel($place, $dbComponents);
     $componentPanel->setPositionList($dbPositions);
     $componentPanel->setSettingList($dbSettings);
     $componentPanel->setSchemeList($schemeList);
     if (!empty($activeScheme)) {
         $componentPanel->setScheme($activeScheme);
     }
     $menu = $this->getMenu();
     $this->addComponent('menu', $menu);
     $this->assign('componentPanel', $componentPanel->render());
 }
示例#2
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());
 }