You are here

function page_manager_page_form_delete_submit in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 page_manager/plugins/tasks/page.admin.inc \page_manager_page_form_delete_submit()

Submit handler to delete a view.

File

page_manager/plugins/tasks/page.admin.inc, line 1518
Administrative functions for the page subtasks.

Code

function page_manager_page_form_delete_submit(&$form, &$form_state) {
  $page = $form_state['page']->subtask['subtask'];
  page_manager_page_delete($page);
  if ($page->type != t('Overridden')) {
    $form_state['redirect'] = 'admin/structure/pages';
    drupal_set_message(t('The page has been deleted.'));
  }
  else {
    $form_state['redirect'] = page_manager_edit_url($form_state['page']->task_name, array(
      'summary',
    ));
    drupal_set_message(t('The page has been reverted.'));
  }
}