本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}
}
示例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);
}
}
示例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);
}
}