You are here

function breakpoints_breakpoint_group_save in Breakpoints 7

Save a single breakpoint group.

9 calls to breakpoints_breakpoint_group_save()
BreakpointGroupCRUDTestCase::testBreakpointGroupCRUD in ./breakpoints.test
Test CRUD operations for breakpoint groups.
breakpoints_admin_breakpoints_submit in ./breakpoints.admin.inc
Admin form submit.
breakpoints_admin_breakpoint_group_edit_form_submit in ./breakpoints.admin.inc
breakpoints_admin_breakpoint_group_import_form_submit in ./breakpoints.admin.inc
Import breakpoint group.
breakpoints_breakpoints_group_duplicate in ./breakpoints.module
Duplicate a group.

... See full list

File

./breakpoints.module, line 676
Breakpoints @todo: provide button to reload breakpoints from theme

Code

function breakpoints_breakpoint_group_save(&$breakpoint_group) {
  ctools_include('export');
  $update = isset($breakpoint_group->id) && is_numeric($breakpoint_group->id) ? array(
    'id',
  ) : array();
  $result = drupal_write_record('breakpoint_group', $breakpoint_group, $update);

  // rebuild menu if we add a new group
  if (empty($update)) {
    variable_set('menu_rebuild_needed', TRUE);
  }
  breakpoints_breakpoint_group_reset();
  return $result;
}