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


PHP ctools_export_ui::edit_execute_form方法代码示例

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


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

示例1: array

 /**
  * Overrides ctools_export_ui::edit_execute_form().
  *
  * This is hacky, but since CTools Export UI uses drupal_goto() we have to
  * effectively change the plugin to modify the redirect path dynamically.
  */
 function edit_execute_form(&$form_state)
 {
     $output = parent::edit_execute_form($form_state);
     if (!empty($form_state['executed'])) {
         $clicked = $form_state['clicked_button']['#value'];
         if (t('Add item') == $clicked || t('Save and edit') == $clicked) {
             // We always want to redirect back to this page when adding an item,
             // but we want to preserve the destination so we can be redirected back
             // to where we came from after clicking "Save".
             $options = array();
             if (!empty($_GET['destination'])) {
                 $options['query']['destination'] = $_GET['destination'];
                 unset($_GET['destination']);
             }
             // Sets redirect path and options.
             $op = $form_state['op'];
             $name = $form_state['values']['name'];
             $path = 'add' != $op ? current_path() : 'admin/config/search/current_search/list/' . $name . '/edit';
             $this->plugin['redirect'][$op] = array($path, $options);
         }
     }
     return $output;
 }
开发者ID:ludichrislyts,项目名称:fieldWork,代码行数:29,代码来源:current_search_export_ui.class.php

示例2: edit_execute_form

 /**
  * Implements ctools_export_ui::edit_execute_form().
  *
  * This is hacky, but since CTools Export UI uses drupal_goto() we have to
  * effectively change the plugin to modify the redirect path dynamically.
  */
 public function edit_execute_form(&$form_state)
 {
     $output = parent::edit_execute_form($form_state);
     if (!empty($form_state['executed'])) {
         if ($form_state['clicked_button']['#name'] == 'saveandedit') {
             // We always want to redirect back to this page when adding an item,
             // but we want to preserve the destination so we can be redirected back
             // to where we came from after clicking "Save".
             $options = array();
             if (!empty($_GET['destination'])) {
                 $options['query']['destination'] = $_GET['destination'];
                 unset($_GET['destination']);
             }
             // Sets redirect path and options.
             $op = $form_state['op'];
             $path = 'add' != $op ? current_path() : 'admin/structure/openlayers/' . $this->plugin['menu']['menu item'] . '/list/' . $form_state['item']->machine_name . '/edit/start';
             $this->plugin['redirect'][$op] = array($path, $options);
         }
     }
     return $output;
 }
开发者ID:EMerino236,项目名称:afiperudrupal,代码行数:27,代码来源:OpenlayersObjects.php


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