You are here

function elysia_cron_admin_menu in Elysia Cron 7.2

Same name and namespace in other branches
  1. 6.2 elysia_cron.module \elysia_cron_admin_menu()

Implements hook_admin_menu().

Parameters

array &$deleted: Array of links under admin/* that were removed by admin_menu_adjust_items(). If one of these links is added back, it should be removed from the array.

Return value

array Links array.

File

./elysia_cron.module, line 1950

Code

function elysia_cron_admin_menu(&$deleted) {
  $links = array();
  elysia_cron_initialize();
  global $_elysia_cron_settings_by_channel;

  // Add link to manually run cron.
  $links[] = array(
    'title' => 'Elysia cron manual',
    'path' => 'admin/config/system/cron',
    'weight' => 50,
    'has_children' => FALSE,
    'parent_path' => '<front>',
  );
  foreach ($_elysia_cron_settings_by_channel as $channel => $data) {
    foreach ($data as $job => $conf) {
      if ($job != '#data') {
        $links[] = array(
          'title' => "Elysia cron run manual !title",
          'path' => 'admin/config/system/cron/execute/' . $job,
          'weight' => -50,
          'query' => 'destination',
          'parent_path' => 'admin/config/system/cron',
          'options' => array(
            't' => array(
              '!title' => $conf['module'],
            ),
          ),
        );
      }
    }
  }
  return $links;
}