本文整理匯總了PHP中SiteConfig::getEditable方法的典型用法代碼示例。如果您正苦於以下問題:PHP SiteConfig::getEditable方法的具體用法?PHP SiteConfig::getEditable怎麽用?PHP SiteConfig::getEditable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SiteConfig
的用法示例。
在下文中一共展示了SiteConfig::getEditable方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getAdminInterface
/**
* Build and return admin interface
*
* Any module providing an admin interface is required to have this function, which
* returns a string containing the (x)html of it's admin interface.
* @return string
*/
function getAdminInterface()
{
$id = @$_REQUEST['siteconfig_id'];
$option = new SiteConfig($id);
switch (@$_REQUEST['action']) {
case 'addedit':
$form = $option->getAddEditForm();
if ($form->validate() && $form->isSubmitted() && isset($_REQUEST['siteconfig_submit'])) {
// do nothing
} else {
return $form->display();
}
break;
case 'toggle':
$option->setEditable(1 - $option->getEditable());
$option->save();
break;
case 'delete':
$option->delete();
$option = NULL;
break;
default:
}
$siteconfigs = SiteConfig::getAllSiteConfigs();
$norex = NOREX;
$this->smarty->assign('norex', $norex);
$this->smarty->assign('siteconfigs', $siteconfigs);
return $this->smarty->fetch('admin/siteconfigs.tpl');
}