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


PHP WebModule::prepareAdminForSection方法代碼示例

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


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

示例1: prepareAdminForSection

  protected function prepareAdminForSection($section, &$adminModule) {
    switch ($section) {
      case 'primary_modules':
      case 'secondary_modules':
        
        $adminModule->setTemplatePage('module_order', $this->id);
        $adminModule->addInternalJavascript("/modules/{$this->id}/javascript/admin.js");
        $adminModule->addInternalCSS("/modules/{$this->id}/css/admin.css");

        $allModules = $this->getAllModules();
        $navigationModules = $this->getNavigationModules();

        foreach ($allModules as $moduleID=>$module) {
          $allModules[$moduleID] = $module->getModuleName();
        }

        foreach ($navigationModules[rtrim($section,'_modules')] as $moduleID=>$module) {
          $sectionModules[$moduleID] = $module['title'];
        }
        
        $adminModule->assign('allModules', $allModules);
        $adminModule->assign('sectionModules', $sectionModules);
        break;
      default:
        return parent::prepareAdminForSection($section, $adminModule);
    }
  }
開發者ID:nicosiseng,項目名稱:Kurogo-Mobile-Web,代碼行數:27,代碼來源:HomeWebModule.php

示例2: prepareAdminForSection

  protected function prepareAdminForSection($section, &$adminModule) {
      switch ($section)
      {
          case 'feeds':
              $feeds = $this->loadFeedData();
              $adminModule->assign('feeds', $feeds);
              $adminModule->setTemplatePage('feedAdmin', $this->id);
              break;
          default:
              return parent::prepareAdminForSection($section, $adminModule);
      }
 }
開發者ID:nicosiseng,項目名稱:Kurogo-Mobile-Web,代碼行數:12,代碼來源:EmergencyWebModule.php

示例3: prepareAdminForSection

 protected function prepareAdminForSection($section, &$adminModule) {
   switch ($section) {
     case 'links':
       $adminModule->setTemplatePage('admin_links', $this->id);
       $adminModule->addInternalJavascript("/modules/{$this->id}/javascript/admin.js");
       $adminModule->addInternalCSS("/modules/{$this->id}/css/admin.css");
       $links = $this->getModuleArray('links');
       $adminModule->assign('links', $links);
       break;
     default:
       return parent::prepareAdminForSection($section, $adminModule);
       break;
   }
 }
開發者ID:nicosiseng,項目名稱:Kurogo-Mobile-Web,代碼行數:14,代碼來源:LinksWebModule.php

示例4: prepareAdminForSection

    protected function prepareAdminForSection($section, &$adminModule) {
        switch ($section)
        {
            case 'feeds':
                $feeds = $this->loadFeedData();
                $adminModule->addInternalJavascript("/modules/content/javascript/admin.js");
//                $adminModule->addInternalCSS("/modules/content/css/admin.css");
                $adminModule->assign('feeds', $feeds);
                $adminModule->assign('showFeedLabels', true);
                $adminModule->assign('showNew', true);
                $adminModule->assign('content_types', array(
                    'html'=>'HTML (editable)',
                    'html_url'=>'HTML (remote)',
                    'rss'=>'RSS (remote)'
                ));
                $adminModule->setTemplatePage('feedAdmin', 'content');
                break;
            default:
                return parent::prepareAdminForSection($section, $adminModule);
        }
   }
開發者ID:nicosiseng,項目名稱:Kurogo-Mobile-Web,代碼行數:21,代碼來源:ContentWebModule.php

示例5: prepareAdminForSection

 protected function prepareAdminForSection($section, &$adminModule) {
   switch ($section)
   {
       case 'feeds':
           $feeds = $this->loadFeedData();
           $adminModule->assign('feeds', $feeds);
           $adminModule->setTemplatePage('feedAdmin', $this->id);
           $formListItems = array();
           foreach ($feeds as $feed=>$data) {
               foreach ($data as $key=>$value) {
                   $formListItems[] = array(
                       'label'=>$key,
                       'type'=>'text',
                       'name'=>sprintf("moduleData[feeds][%s][%s]", $feed, $key),
                       'value'=>$value
                   );
               }
           }
           
           $adminModule->assign('peopleAdminListItems', $formListItems);
           break;
       default:
           return parent::prepareAdminForSection($section, $adminModule);
       
   }
 }
開發者ID:JimiSlew,項目名稱:kurogo-old,代碼行數:26,代碼來源:PeopleWebModule.php


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