You are here

function hook_scheduler_api in Scheduler 7

Allow modules to react to Scheduler node operations.

Modules can implement hook_scheduler_api() to react to the Scheduler action being performed on a node. This hook is invoked during cron processing for 'pre_publish', 'publish', 'pre_unpublish' and 'unpublish' and from scheduler_node_presave() for 'publish_immediately'.

Parameters

object $node: The scheduled node object that is being processed.

string $action: $action determines what is being done to the node. The value will be 'pre_publish', 'publish', 'publish_immediately', 'pre_unpublish' or 'unpublish'.

1 invocation of hook_scheduler_api()
_scheduler_scheduler_api in ./scheduler.module
Scheduler API to perform actions when nodes are (un)published.

File

./scheduler.api.php, line 28
API documentation for the Scheduler module.

Code

function hook_scheduler_api($node, $action) {
  switch ($action) {
    case 'pre_publish':
      break;
    case 'publish':
      break;
    case 'publish_immediately':
      break;
    case 'pre_unpublish':
      break;
    case 'unpublish':
      break;
    default:
  }
}