function _panels_sections_delete in Panels Sections 6
Same name and namespace in other branches
- 6.2 panels_sections.module \_panels_sections_delete()
delete a section
Parameters
object $section:
1 string reference to '_panels_sections_delete'
- panels_sections_menu in ./
panels_sections.module - Implementation of hook_menu().
File
- ./
panels_sections.module, line 231 - Allows you to define panels_sections of your site and apply s to those panels_sections.
Code
function _panels_sections_delete($section) {
$op = $_POST['op'];
switch ($op) {
case t('Delete'):
db_query("DELETE FROM {panels_sections_data} WHERE sid = %d", $section->sid);
drupal_set_message(t('The section %name has been deleted.', array(
'%name' => $section->name,
)));
cache_clear_all();
drupal_goto('admin/panels/panels_sections');
break;
default:
$output = drupal_get_form('_panels_sections_delete_confirm', $section);
break;
}
return $output;
}