function finder_ui::edit_page in Finder 7.2
Main entry point to edit an item.
Overrides ctools_export_ui::edit_page
File
- modules/
finder_ui/ plugins/ export_ui/ finder_ui.class.php, line 186 - Contains the CTools Export UI integration code.
Class
- finder_ui
- CTools Export UI class handler for Finder UI.
Code
function edit_page($js, $input, $item, $step = NULL) {
ctools_include('object-cache');
drupal_set_title($this
->get_page_title('edit', $item));
$cached = ctools_object_cache_get('finder', $item->name);
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;
}