3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * This file hard-codes the path entries for the queueing UI, which
14 * allows us to use these paths during upgrades.
17 * @copyright CiviCRM LLC https://civicrm.org/licensing
20 require_once 'CRM/Core/I18n.php';
23 * Class CRM_Queue_Menu
25 class CRM_Queue_Menu
{
29 * The path for which we are trying to locate the route.
30 * @param array $menuPath
33 public static function alter($path, &$menuPath) {
35 case 'civicrm/queue/runner':
36 case 'civicrm/upgrade/queue/runner':
37 $menuPath['path'] = $path;
38 $menuPath['title'] = 'Queue Runner';
39 $menuPath['page_callback'] = 'CRM_Queue_Page_Runner';
40 $menuPath['access_arguments'][0][] = 'access CiviCRM';
41 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];
44 case 'civicrm/queue/ajax/runNext':
45 case 'civicrm/upgrade/queue/ajax/runNext':
46 $menuPath['path'] = $path;
47 $menuPath['page_callback'] = ['CRM_Queue_Page_AJAX', 'runNext'];
48 $menuPath['access_arguments'][0][] = 'access CiviCRM';
49 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];
52 case 'civicrm/queue/ajax/skipNext':
53 case 'civicrm/upgrade/queue/ajax/skipNext':
54 $menuPath['path'] = $path;
55 $menuPath['page_callback'] = ['CRM_Queue_Page_AJAX', 'skipNext'];
56 $menuPath['access_arguments'][0][] = 'access CiviCRM';
57 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];
60 case 'civicrm/queue/ajax/onEnd':
61 case 'civicrm/upgrade/queue/ajax/onEnd':
62 $menuPath['path'] = $path;
63 $menuPath['page_callback'] = ['CRM_Queue_Page_AJAX', 'onEnd'];
64 $menuPath['access_arguments'][0][] = 'access CiviCRM';
65 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];