function ctools_export_ui::edit_page in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 plugins/export_ui/ctools_export_ui.class.php \ctools_export_ui::edit_page()
Main entry point to edit an item.
File
- plugins/
export_ui/ ctools_export_ui.class.php, line 645
Class
- ctools_export_ui
- Base class for export UI.
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'])) {
$export_key = $this->plugin['export']['key'];
drupal_goto(str_replace('%ctools_export_ui', $form_state['item']->{$export_key}, $this->plugin['redirect']['edit']));
}
return $output;
}