function hook_workbench_scheduler_post_save_node_schedule in Workbench Scheduler 7.2
Same name and namespace in other branches
- 7 workbench_scheduler.api.inc \hook_workbench_scheduler_post_save_node_schedule()
Perform action after saving a node schedule.
This hook is invoked from workbench_scheduler_save_node_schedule() after a schedule has been updated for a node.
Parameters
int $nid: The node id.
int $vid: The revision id.
array $schedule_data: An associative array of schedule information The associative array contains the following data:
- sid: the schedule id
- name: the unique machine name for the schedule
- start_state: the name of the starting moderation state (optional)
- end_state: the name of the ending moderation state (optional)
- start_date: the timestamp when to apply the start state
- end_date: the timestamp when to apply the end date.
1 invocation of hook_workbench_scheduler_post_save_node_schedule()
- workbench_scheduler_save_node_schedule in ./
workbench_scheduler.module - Saves the schedule data for a given node revision.
File
Code
function hook_workbench_scheduler_post_save_node_schedule($nid, $vid, $schedule_data) {
// Load the node.
$node = node_load($nid, $vid);
// Set a watchdog log message.
watchdog('workbench_scheduler', 'Schedule has been saved for @title.', array(
'@title' => $node->title,
), WATCHDOG_NOTICE);
}