You are here

function hook_scheduler_nid_list in Scheduler 8

Same name and namespace in other branches
  1. 7 scheduler.api.php \hook_scheduler_nid_list()

Hook function to add node ids to the list being processed.

This hook allows modules to add more node ids into the list being processed in the current cron run. It is invoked during cron runs only. This function is retained for backwards compatibility but is superceded by the more flexible hook_scheduler_nid_list_alter().

Parameters

string $action: The action being done to the node - 'publish' or 'unpublish'.

Return value

array Array of node ids to add to the existing list of nodes to be processed.

1 function implements hook_scheduler_nid_list()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

scheduler_api_test_scheduler_nid_list in tests/modules/scheduler_api_test/scheduler_api_test.module
Implements hook_scheduler_nid_list().
1 invocation of hook_scheduler_nid_list()
SchedulerManager::nidList in src/SchedulerManager.php
Gather node IDs for all nodes that need to be $action'ed.

File

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

Code

function hook_scheduler_nid_list($action) {
  $nids = [];

  // Do some processing to add new node ids into $nids.
  return $nids;
}