public function ctools_export_ui::delete_page in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 plugins/export_ui/ctools_export_ui.class.php \ctools_export_ui::delete_page()
Page callback to delete an exportable item.
File
- plugins/
export_ui/ ctools_export_ui.class.php, line 1199
Class
- ctools_export_ui
- Base class for export UI.
Code
public function delete_page($js, $input, $item) {
$form_state = array(
'plugin' => $this->plugin,
'object' => &$this,
'ajax' => $js,
'item' => $item,
'op' => $item->export_type & EXPORT_IN_CODE ? 'revert' : 'delete',
'rerender' => TRUE,
'no_redirect' => TRUE,
);
$output = drupal_build_form('ctools_export_ui_delete_confirm_form', $form_state);
if (!empty($form_state['executed'])) {
$this
->delete_form_submit($form_state);
$this
->redirect($form_state['op'], $item);
}
return $output;
}