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); } }
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); } }
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; } }
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); } }
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); } }