You are here

function cer_toggle_preset in Corresponding Entity References 7.3

Enables or disables a preset, depending on its current status. This callback is defined by CerUIController::hook_menu().

1 string reference to 'cer_toggle_preset'
CerUIController::hook_menu in includes/CerUIController.inc
Provides definitions for implementing hook_menu().

File

./cer.admin.inc, line 64

Code

function cer_toggle_preset(CerPreset $preset) {
  $preset->wrapper->cer_enabled
    ->set(!$preset->wrapper->cer_enabled
    ->value());
  $preset
    ->save();
  drupal_goto(isset($_GET['destination']) ? $_GET['destination'] : 'admin/config/content/cer');
}