function ds_extras_vd_bundle_remove_submit

cis7 ds_extras.vd.inc ds_extras_vd_bundle_remove_submit($form, &$form_state)
cle7 ds_extras.vd.inc ds_extras_vd_bundle_remove_submit($form, &$form_state)
elmsmedia7 ds_extras.vd.inc ds_extras_vd_bundle_remove_submit($form, &$form_state)
icor7 ds_extras.vd.inc ds_extras_vd_bundle_remove_submit($form, &$form_state)
meedjum_blog7 ds_extras.vd.inc ds_extras_vd_bundle_remove_submit($form, &$form_state)
mooc7 ds_extras.vd.inc ds_extras_vd_bundle_remove_submit($form, &$form_state)

Submit callback: remove a views bundle

File

sites/all/modules/ulmus/ds/modules/ds_extras/includes/ds_extras.vd.inc, line 246
Views displays functions.

Code

function ds_extras_vd_bundle_remove_submit($form, &$form_state) {

  $bundle = $form['#bundle'];
  $label = $form['#label'];

  // Remove bundle.
  db_delete('ds_vd')->condition('vd', $bundle)->execute();

  // Remove layout.
  db_delete('ds_layout_settings')->condition('bundle', $bundle)->execute();

  // Remove settings.
  db_delete('ds_field_settings')->condition('bundle', $bundle)->execute();

  // Remove from bundle settings.
  variable_del('field_bundle_settings_ds_views__' . $bundle);

  // Clear entity cache and field info fields cache.
  cache_clear_all('field_info_fields', 'cache_field');
  cache_clear_all('entity_info', 'cache', TRUE);

  drupal_set_message(t('Bundle @label has been removed.', array('@label' => $label)));
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.