當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BOL_ComponentAdminService::findAllSettingList方法代碼示例

本文整理匯總了PHP中BOL_ComponentAdminService::findAllSettingList方法的典型用法代碼示例。如果您正苦於以下問題:PHP BOL_ComponentAdminService::findAllSettingList方法的具體用法?PHP BOL_ComponentAdminService::findAllSettingList怎麽用?PHP BOL_ComponentAdminService::findAllSettingList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BOL_ComponentAdminService的用法示例。


在下文中一共展示了BOL_ComponentAdminService::findAllSettingList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: index

 public function index($paramList)
 {
     $place = BOL_ComponentService::PLACE_INDEX;
     $customize = !empty($paramList['mode']) && $paramList['mode'] == 'customize';
     $allowCustomize = OW::getUser()->isAdmin();
     $template = 'drag_and_drop_index';
     if ($customize) {
         if (!OW::getUser()->isAuthenticated()) {
             throw new AuthenticateException();
         }
         if (!$allowCustomize) {
             $this->redirect(OW::getRouter()->uriForRoute('base_index'));
         }
     }
     if ($allowCustomize) {
         $template = $customize ? 'drag_and_drop_index_customize' : 'drag_and_drop_index';
         if ($customize) {
             OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'base', 'main_menu_index');
         }
     }
     if ($customize) {
         $masterPageFileDir = OW::getThemeManager()->getMasterPageTemplate('dndindex');
         OW::getDocument()->getMasterPage()->setTemplate($masterPageFileDir);
         $this->setDocumentKey('base_index_page_customize');
     } else {
         $this->setDocumentKey('base_index_page');
     }
     $schemeList = $this->componentAdminService->findSchemeList();
     $state = $this->componentAdminService->findCache($place);
     if (empty($state)) {
         $state = array();
         $state['defaultComponents'] = $this->componentAdminService->findPlaceComponentList($place);
         $state['defaultPositions'] = $this->componentAdminService->findAllPositionList($place);
         $state['defaultSettings'] = $this->componentAdminService->findAllSettingList();
         $state['defaultScheme'] = (array) $this->componentAdminService->findSchemeByPlace($place);
         $this->componentAdminService->saveCache($place, $state);
     }
     $defaultComponents = $state['defaultComponents'];
     $defaultPositions = $state['defaultPositions'];
     $defaultSettings = $state['defaultSettings'];
     $defaultScheme = $state['defaultScheme'];
     if (empty($defaultScheme) && !empty($schemeList)) {
         $defaultScheme = reset($schemeList);
     }
     $componentPanel = new BASE_CMP_DragAndDropIndex($place, $defaultComponents, $customize, $template);
     $componentPanel->allowCustomize($allowCustomize);
     $customizeUrls = array('customize' => OW::getRouter()->urlForRoute('base_index_customize', array('mode' => 'customize')), 'normal' => OW::getRouter()->urlForRoute('base_index'));
     $componentPanel->customizeControlCunfigure($customizeUrls['customize'], $customizeUrls['normal']);
     $componentPanel->setSchemeList($schemeList);
     $componentPanel->setPositionList($defaultPositions);
     $componentPanel->setSettingList($defaultSettings);
     $componentPanel->setScheme($defaultScheme);
     /* $themeName = OW_Config::getInstance()->getValue('base', 'selectedTheme');
        $sidebarPosition = BOL_ThemeService::getInstance()->findThemeByName($themeName)->getSidebarPosition(); */
     $sidebarPosition = OW::getThemeManager()->getCurrentTheme()->getDto()->getSidebarPosition();
     $componentPanel->setSidebarPosition($sidebarPosition);
     $componentPanel->assign('adminPluginsUrl', OW::getRouter()->urlForRoute('admin_plugins_installed'));
     $this->addComponent('componentPanel', $componentPanel);
     $this->setDocumentKey('base_index_page');
 }
開發者ID:vazahat,項目名稱:dudex,代碼行數:60,代碼來源:component_panel.php


注:本文中的BOL_ComponentAdminService::findAllSettingList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。