You are here

function paragraphs_admin_bundle_delete_form_submit in Paragraphs 7

Process and confirm paragraphs bundle deletion.

Parameters

array $form: The form structure array.

array $form_state: An associative array containing the current state of the form.

See also

paragraphs_admin_bundle_delete_form()

File

./paragraphs.admin.inc, line 299
Admin functions for the paragraphs module.

Code

function paragraphs_admin_bundle_delete_form_submit(array $form, array &$form_state) {
  paragraphs_bundle_delete($form_state['values']['type']);
  $t_args = array(
    '%name' => $form_state['values']['name'],
  );
  drupal_set_message(t('The paragraph bundle %name has been deleted.', $t_args));
  watchdog('paragraphs', 'Deleted paragraph bundle %name.', $t_args, WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/structure/paragraphs';
}