function ctools_export_ui::edit_page

Main entry point to edit an item.

File

plugins/export_ui/ctools_export_ui.class.php, line 685

Class

ctools_export_ui
Base class for export UI.

Code

public function edit_page($js, $input, $item, $step = NULL) {
    $args = func_get_args();
    drupal_set_title($this->get_page_title('edit', $item), PASS_THROUGH);
    // 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' => $args,
    );
    $output = $this->edit_execute_form($form_state);
    if (!empty($form_state['executed']) && empty($form_state['rebuild'])) {
        $this->redirect($form_state['op'], $form_state['item']);
    }
    return $output;
}