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


PHP RGFormsModel::flush_current_forms方法代码示例

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


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

示例1: duplicate_notification

 public static function duplicate_notification($notification_id, $form_id)
 {
     if (!$form_id) {
         return false;
     }
     $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id;
     $new_notification = $form['notifications'][$notification_id];
     $name = rgar($new_notification, "name");
     $new_id = uniqid();
     $count = 2;
     $new_name = $name . " - Copy 1";
     while (!self::is_unique_name($new_name, $form['notifications'])) {
         $new_name = $name . " - Copy {$count}";
         $count++;
     }
     $new_notification["name"] = $new_name;
     $new_notification["id"] = $new_id;
     $form['notifications'][$new_id] = $new_notification;
     // clear Form cache so next retrieval of form meta will return duplicated notification
     RGFormsModel::flush_current_forms();
     return RGFormsModel::save_form_notifications($form['id'], $form['notifications']);
 }
开发者ID:rushabhrakholiya,项目名称:TEST,代码行数:22,代码来源:notification.php

示例2: duplicate_notification

 public static function duplicate_notification($notification_id, $form_id)
 {
     if (!$form_id) {
         return false;
     }
     $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id;
     $new_notification = $form['notifications'][$notification_id];
     $name = rgar($new_notification, 'name');
     $new_id = uniqid();
     $count = 2;
     $new_name = $name . ' - Copy 1';
     while (!self::is_unique_name($new_name, $form['notifications'])) {
         $new_name = $name . " - Copy {$count}";
         $count++;
     }
     $new_notification['name'] = $new_name;
     $new_notification['id'] = $new_id;
     unset($new_notification['isDefault']);
     if ($new_notification['toType'] == 'hidden') {
         $new_notification['toType'] = 'email';
     }
     $form['notifications'][$new_id] = $new_notification;
     // clear Form cache so next retrieval of form meta will return duplicated notification
     RGFormsModel::flush_current_forms();
     return RGFormsModel::save_form_notifications($form['id'], $form['notifications']);
 }
开发者ID:jamesaveryw,项目名称:mississippi-staging,代码行数:26,代码来源:notification.php

示例3: delete_confirmation

 /**
  * Delete a form confirmation by ID.
  *
  * @param mixed $confirmation_id
  * @param mixed $form_id Can pass a form ID or a form object
  *
  * @return mixed The result of the database operation
  */
 public static function delete_confirmation($confirmation_id, $form_id)
 {
     if (!$form_id) {
         return false;
     }
     $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id;
     do_action('gform_pre_confirmation_deleted', $form['confirmations'][$confirmation_id], $form);
     unset($form['confirmations'][$confirmation_id]);
     // clear form cache so next retrieval of form meta will reflect deleted notification
     RGFormsModel::flush_current_forms();
     return RGFormsModel::save_form_confirmations($form['id'], $form['confirmations']);
 }
开发者ID:renztoygwapo,项目名称:lincoln,代码行数:20,代码来源:form_settings.php

示例4: delete_confirmation

 /**
  * Delete a form confirmation by ID.
  *
  * @param mixed $confirmation_id
  * @param mixed $form_id Can pass a form ID or a form object
  *
  * @return mixed The result of the database operation
  */
 public static function delete_confirmation($confirmation_id, $form_id)
 {
     if (!$form_id) {
         return false;
     }
     $form = !is_array($form_id) ? RGFormsModel::get_form_meta($form_id) : $form_id;
     /**
      * Fires right before the confirmation that a form is deleted
      *
      * @param int $form['confirmations'][ $confirmation_id ] The delete confirmation object ID
      * @para array $form The Form object to filter through
      */
     do_action('gform_pre_confirmation_deleted', $form['confirmations'][$confirmation_id], $form);
     unset($form['confirmations'][$confirmation_id]);
     // clear form cache so next retrieval of form meta will reflect deleted notification
     RGFormsModel::flush_current_forms();
     return RGFormsModel::save_form_confirmations($form['id'], $form['confirmations']);
 }
开发者ID:wesleykepke,项目名称:ARIA,代码行数:26,代码来源:form_settings.php


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