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


PHP FrmForm::getIdByKey方法代码示例

本文整理汇总了PHP中FrmForm::getIdByKey方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmForm::getIdByKey方法的具体用法?PHP FrmForm::getIdByKey怎么用?PHP FrmForm::getIdByKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FrmForm的用法示例。


在下文中一共展示了FrmForm::getIdByKey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_form_update_with_ajax

 /**
  * @covers FrmFormsController::update
  * with ajax
  */
 function test_form_update_with_ajax()
 {
     $form_id = FrmForm::getIdByKey($this->contact_form_key);
     self::_setup_post_values($form_id);
     try {
         $this->_handleAjax('frm_save_form');
     } catch (WPAjaxDieStopException $e) {
         unset($e);
         // Expected to return form successfully updated message
     }
     self::_check_updated_values($form_id);
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:16,代码来源:test_FrmFormsControllerAjax.php

示例2: test_get_all_for_form

 /**
  * @covers FrmField::get_all_for_form
  */
 function test_get_all_for_form()
 {
     $forms = array('basic_test' => array('form_key' => $this->contact_form_key, 'count' => 8), 'repeat' => array('form_key' => $this->all_fields_form_key, 'count' => 33 + 3), 'no_repeat_or_embed' => array('form_key' => $this->all_fields_form_key, 'count' => 33), 'repeat_and_embed' => array('form_key' => $this->all_fields_form_key, 'count' => 33 + 3 + 8));
     foreach ($forms as $test => $args) {
         $form_id = FrmForm::getIdByKey($args['form_key']);
         if ($test == 'no_repeat_or_embed') {
             $fields = FrmField::get_all_for_form($form_id, '', 'exclude', 'exclude');
         } else {
             if ($test == 'repeat_and_embed') {
                 $fields = FrmField::get_all_for_form($form_id, '', 'include', 'include');
             } else {
                 $fields = FrmField::get_all_for_form($form_id);
             }
         }
         $this->assertNotEmpty($fields);
         $this->assertEquals($args['count'], count($fields), 'An incorrect number of fields are retrieved with FrmField::get_all_for_form.');
     }
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:21,代码来源:test_FrmField.php

示例3: get_id_by_key

 function get_id_by_key($form_key)
 {
     return FrmForm::getIdByKey($form_key);
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:4,代码来源:frm_factory.php

示例4: test_get_all_for_form

 /**
  * @covers FrmField::get_all_for_form
  */
 function test_get_all_for_form()
 {
     $form_id = FrmForm::getIdByKey($this->contact_form_key);
     $fields = $this->factory->field->get_fields_from_form($form_id);
     $this->assertNotEmpty($fields);
 }
开发者ID:rbkhrlstn,项目名称:formidable-forms,代码行数:9,代码来源:test_FrmField.php

示例5: _check_xml_updated_number_of_entries

 function _check_xml_updated_number_of_entries($args)
 {
     $parent_entries = FrmEntry::getAll(array('form_id' => $args['parent_form_id']));
     $this->assertEquals(count($args['parent_entries']), count($parent_entries), 'The number of entries in form ' . $args['parent_form_id'] . ' should be the same after an XML update.');
     $rep_sec_form_id = FrmForm::getIdByKey($this->repeat_sec_form_key);
     $child_entries = FrmEntry::getAll(array('form_id' => $rep_sec_form_id));
     $this->assertEquals(count($args['child_entries']), count($child_entries), 'The number of entries in form ' . $rep_sec_form_id . ' should be the same after an XML update.');
     $embed_form_id = FrmForm::getIdByKey($this->contact_form_key);
     $embedded_entries = FrmEntry::getAll(array('form_id' => $embed_form_id, 'parent_item_id !' => 0));
     $this->assertEquals(count($args['embedded_entries']), count($embedded_entries), 'The number of entries in the embedded form should be the same after an XML update.');
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:11,代码来源:test_FrmProXMLHelper.php

示例6: _get_xml_update_args

 function _get_xml_update_args()
 {
     $parent_form_id = FrmForm::getIdByKey($this->all_fields_form_key);
     $repeating_section_id = FrmField::get_id_by_key('repeating-section');
     $all_fields = FrmField::get_all_for_form($parent_form_id, '', 'include', 'include');
     $repeating_section = FrmField::getOne($repeating_section_id);
     $rep_sec_form = FrmForm::getOne($repeating_section->field_options['form_select']);
     $repeating_fields = FrmField::get_all_for_form($repeating_section->field_options['form_select']);
     $args = array('parent_form_id' => $parent_form_id, 'repeating_section' => $repeating_section, 'all_fields' => $all_fields, 'rep_sec_form' => $rep_sec_form, 'repeating_fields' => $repeating_fields);
     return $args;
 }
开发者ID:knightzac19,项目名称:formidable-forms,代码行数:11,代码来源:test_FrmXMLHelper.php


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