本文整理汇总了PHP中EEH_Form_Fields::generate_question_groups_html方法的典型用法代码示例。如果您正苦于以下问题:PHP EEH_Form_Fields::generate_question_groups_html方法的具体用法?PHP EEH_Form_Fields::generate_question_groups_html怎么用?PHP EEH_Form_Fields::generate_question_groups_html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EEH_Form_Fields
的用法示例。
在下文中一共展示了EEH_Form_Fields::generate_question_groups_html方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _reg_questions_meta_box
/**
* generates HTML for the Registration Questions meta box
* @access public
* @return void
*/
public function _reg_questions_meta_box()
{
add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($this, 'form_before_question_group'), 10, 1);
add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($this, 'form_after_question_group'), 10, 1);
add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'form_form_field_label_wrap'), 10, 1);
add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'form_form_field_input__wrap'), 10, 1);
$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($this->_registration, $this->_registration->get('EVT_ID'));
//EEH_Debug_Tools::printr( $question_groups, '$question_groups <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
EE_Registry::instance()->load_helper('Form_Fields');
$this->_template_args['att_questions'] = EEH_Form_Fields::generate_question_groups_html($question_groups);
$this->_template_args['reg_questions_form_action'] = 'update_attendee_registration_form';
$this->_template_args['REG_ID'] = $this->_registration->ID();
$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
echo EEH_Template::display_template($template_path, $this->_template_args, TRUE);
}
示例2: ee_deprecated_reg_questions_meta_box_old
/**
* Render the registration admin page's custom questions area in the old fashion
* and firing the old hooks. When this method is removed, we can probably also
* remove the deprecated methods form_before_question_group, form_after_question_group,
* form_form_field_label_wrap and form_form_field_input__wrap in Registrations_Admin_Page
*
* @param boolean $do_default_action
* @param EE_Admin_Page $admin_page
* @param EE_Registration $registration
* @return bool
* @throws \EE_Error
*/
function ee_deprecated_reg_questions_meta_box_old($do_default_action, $admin_page, $registration)
{
//check if the old hooks are in use. If not, do the default
if (!ee_deprecated_using_old_registration_admin_custom_questions_form_hooks() || !$admin_page instanceof EE_Admin_Page) {
return $do_default_action;
}
add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__before_question_group_questions', array($admin_page, 'form_before_question_group'), 10, 1);
add_filter('FHEE__EEH_Form_Fields__generate_question_groups_html__after_question_group_questions', array($admin_page, 'form_after_question_group'), 10, 1);
add_filter('FHEE__EEH_Form_Fields__label_html', array($admin_page, 'form_form_field_label_wrap'), 10, 1);
add_filter('FHEE__EEH_Form_Fields__input_html', array($admin_page, 'form_form_field_input__wrap'), 10, 1);
$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options($registration, $registration->get('EVT_ID'));
EE_Registry::instance()->load_helper('Form_Fields');
$template_args = array('att_questions' => EEH_Form_Fields::generate_question_groups_html($question_groups), 'reg_questions_form_action' => 'edit_registration', 'REG_ID' => $registration->ID());
$template_path = REG_TEMPLATE_PATH . 'reg_admin_details_main_meta_box_reg_questions.template.php';
echo EEH_Template::display_template($template_path, $template_args, TRUE);
//indicate that we should not do the default admin page code
return false;
}