本文整理汇总了PHP中FormHandler::addAllFollowParam方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHandler::addAllFollowParam方法的具体用法?PHP FormHandler::addAllFollowParam怎么用?PHP FormHandler::addAllFollowParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHandler
的用法示例。
在下文中一共展示了FormHandler::addAllFollowParam方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$menu_section = 'menu_config';
HelpElem::DoHelp(_("Templates for subscription services."));
/* We will be using different tables, fields, according to one selection box
at the top of the page: */
$sub_cats = array();
$sub_cats[] = array("all", _("All"));
$sub_cats[] = array("only", _("Generic only"));
$sub_cats[] = array("feature", _("Features"));
$SEL_Form = new SelectionForm();
$SEL_Form->init();
$SEL_Form->model[] = new RefField(_("Category"), 'cat', $sub_cats, _("Select the category of templates."));
// Prepare the model for the base table.
$HD_Form = new FormHandler('subscription_template', _("Templates"), _("Template"));
$HD_Form->checkRights(ACX_MISC);
$HD_Form->init();
$HD_Form->addAllFollowParam($SEL_Form->prefix . 'cat', $SEL_Form->getpost_dirty('cat'), false);
// Modify the model according to the selection:
switch ($SEL_Form->getpost_single('cat')) {
case 'all':
default:
$HD_Form->views['ask-edit'] = $HD_Form->views['ask-edit2'] = $HD_Form->views['edit'] = $HD_Form->views['ask-add'] = $HD_Form->views['ask-add2'] = $HD_Form->views['add'] = $HD_Form->views['ask-delete'] = $HD_Form->views['delete'] = new IdleView();
break;
case 'feature':
$HD_Form->model_table = 'subscription_feature_templ';
break;
case 'only':
$HD_Form->model_table = 'ONLY subscription_template';
break;
}
$PAGE_ELEMS[] =& $SEL_Form;
$PAGE_ELEMS[] =& $HD_Form;