function footable_breakpoint_save in FooTable 7.2
Save a breakpoint.
Parameters
object $breakpoint: FooTable breakpoint object to save to the database. A new breakpoint will be created if $breakpoint->is_new is set to TRUE, otherwise the breakpoint will be updated.
Return value
bool|int If the record insert or update failed, returns FALSE. If it succeeded, returns SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
1 call to footable_breakpoint_save()
- footable_update_7201 in ./
footable.install - Add the 7-x.1.x breakpoints to provide backwards compatibility with the 7.x-1.x version.
File
- ./
footable.module, line 451 - Provides Views integration for the jQuery FooTable plugin.
Code
function footable_breakpoint_save($breakpoint) {
if (!isset($breakpoint->is_new)) {
$breakpoint->is_new = empty($breakpoint->id);
}
$update = !empty($breakpoint->is_new) || !empty($breakpoint->in_code_only) ? array() : 'machine_name';
$result = drupal_write_record('footable_breakpoint', $breakpoint, $update);
ctools_include('export');
ctools_export_load_object_reset('footable_breakpoint');
return $result;
}