You are here

function hook_scheduler_list in Scheduler 2.x

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

This hook allows modules to add more entity 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_list_alter().

Parameters

string $process: The process being done - 'publish' or 'unpublish'.

string $entityTypeId: The type of the entity being processed, for example 'node' or 'media'.

Return value

array Array of ids to add to the existing list to be processed. Duplicates are removed when all hooks have been invoked.

1 function implements hook_scheduler_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_list in tests/modules/scheduler_api_test/scheduler_api_test.module
Implements hook_scheduler_list().

File

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

Code

function hook_scheduler_list($process, $entityTypeId) {
  $ids = [];

  // Do some processing to add ids to the $ids array.
  return $ids;
}