当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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);
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:20,代码来源:Registrations_Admin_Page.core.php

示例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;
}
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:30,代码来源:EE_Deprecated.core.php


注:本文中的EEH_Form_Fields::generate_question_groups_html方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。