1 layout.flexible.inc layout_flexible_template_delete_form_submit(&$form, &$form_state)

Submit handler that deletes a flexible template.

See also

layout_flexible_template_delete_form()

File

core/modules/layout/layout.flexible.inc, line 908
Provides configurable (flexible) layout templates.

Code

function layout_flexible_template_delete_form_submit(&$form, &$form_state) {
  /* @var LayoutFlexibleTemplate $flexible_template */
  $flexible_template = &$form_state['flexible_template'];
  $flexible_template->delete();

  backdrop_set_message(t('The layout template "@title" has been deleted.', array('@title' => $flexible_template->title)));
  $form_state['redirect'] = 'admin/structure/layouts/settings';
}