flag_actions_insert_action

  1. drupal
    1. 6 flag_actions.module function
    2. 7 flag_actions.module function
Drupal 7 flag_actions_insert_action($fid, $event, $threshold, $repeat_threshold, $callback, $parameters)

Insert a new flag action.

Parameters

$fid: The flag object ID.

$event: The flag event, such as "flag" or "unflag".

$threshold: The flagging threshold at which this action will be executed.

$repeat_threshold: The number of additional flaggings after which the action will be repeated.

$callback: The action callback to be executed.

$parameters: The action parameters.

1 call to flag_actions_insert_action()

File

sites/all/modules/flag/flag_actions.module, line 144
Actions support for the Flag module.

Code

function flag_actions_insert_action($fid, $event, $threshold, $repeat_threshold, $callback, $parameters) {
  return db_insert('flag_actions')
    ->fields(array(
    'fid' => $fid, 
    'event' => $event, 
    'threshold' => $threshold, 
    'repeat_threshold' => $repeat_threshold, 
    'callback' => $callback, 
    'parameters' => serialize($parameters),
  ))
    ->execute();
}