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
22 require_once 'CRM/Core/I18n.php';
25 * Class CRM_Queue_Menu
27 class CRM_Queue_Menu
{
31 * The path for which we are trying to locate the route.
32 * @param array $menuPath
35 public static function alter($path, &$menuPath) {
37 case 'civicrm/queue/runner':
38 case 'civicrm/upgrade/queue/runner':
39 $menuPath['path'] = $path;
40 $menuPath['title'] = 'Queue Runner';
41 $menuPath['page_callback'] = 'CRM_Queue_Page_Runner';
42 $menuPath['access_arguments'][0][] = 'access CiviCRM';
43 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];
46 case 'civicrm/queue/ajax/runNext':
47 case 'civicrm/upgrade/queue/ajax/runNext':
48 $menuPath['path'] = $path;
49 $menuPath['page_callback'] = ['CRM_Queue_Page_AJAX', 'runNext'];
50 $menuPath['access_arguments'][0][] = 'access CiviCRM';
51 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];
54 case 'civicrm/queue/ajax/skipNext':
55 case 'civicrm/upgrade/queue/ajax/skipNext':
56 $menuPath['path'] = $path;
57 $menuPath['page_callback'] = ['CRM_Queue_Page_AJAX', 'skipNext'];
58 $menuPath['access_arguments'][0][] = 'access CiviCRM';
59 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];
62 case 'civicrm/queue/ajax/onEnd':
63 case 'civicrm/upgrade/queue/ajax/onEnd':
64 $menuPath['path'] = $path;
65 $menuPath['page_callback'] = ['CRM_Queue_Page_AJAX', 'onEnd'];
66 $menuPath['access_arguments'][0][] = 'access CiviCRM';
67 $menuPath['access_callback'] = ['CRM_Core_Permission', 'checkMenu'];