function current_search_export_ui::edit_page in Facet API 7.2
Same name and namespace in other branches
- 6.3 contrib/current_search/plugins/export_ui/current_search_export_ui.class.php \current_search_export_ui::edit_page()
- 7 contrib/current_search/plugins/export_ui/current_search_export_ui.class.php \current_search_export_ui::edit_page()
Overrides ctools_export_ui::edit_page().
Allows passing of options to drupal_goto() as opposed to just a path.
Overrides ctools_export_ui::edit_page
See also
http://drupal.org/node/1373048
File
- contrib/
current_search/ plugins/ export_ui/ current_search_export_ui.class.php, line 70 - Export UI display customizations.
Class
- current_search_export_ui
- CTools export UI extending class. Slightly customized for Context.
Code
function edit_page($js, $input, $item, $step = NULL) {
drupal_set_title($this
->get_page_title('edit', $item));
// Check to see if there is a cached item to get if we're using the wizard.
if (!empty($this->plugin['use wizard'])) {
$cached = $this
->edit_cache_get($item, 'edit');
if (!empty($cached)) {
$item = $cached;
}
}
$form_state = array(
'plugin' => $this->plugin,
'object' => &$this,
'ajax' => $js,
'item' => $item,
'op' => 'edit',
'form type' => 'edit',
'rerender' => TRUE,
'no_redirect' => TRUE,
'step' => $step,
// Store these in case additional args are needed.
'function args' => func_get_args(),
);
$output = $this
->edit_execute_form($form_state);
if (!empty($form_state['executed'])) {
// @see http://drupal.org/node/1373048
$export_key = $this->plugin['export']['key'];
$args = (array) $this->plugin['redirect']['edit'];
$args[0] = str_replace('%ctools_export_ui', $form_state['item']->{$export_key}, $args[0]);
call_user_func_array('drupal_goto', $args);
}
return $output;
}