當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。