1 layout.admin.inc layout_delete_form_submit(&$form, &$form_state)

Submit handler for layout_delete_form(). Deletes a layout.

File

core/modules/layout/layout.admin.inc, line 2252
Administrative functions for Layout module.

Code

function layout_delete_form_submit(&$form, &$form_state) {
  /* @var Layout $layout */
  $layout = $form_state['layout'];

  if ($layout->storage === LAYOUT_STORAGE_NORMAL) {
    $layout->delete();
    backdrop_set_message(t('The layout has been deleted.'));
  }
  else {
    $layout->revert();
    backdrop_set_message(t('The layout has been reverted.'));
  }
  $form_state['redirect'] = 'admin/structure/layouts';
}