Merge pull request #22805 from braders/permission_denied_wordpress_improvement-altern...
[civicrm-core.git] / CRM / Core / BAO / UserJob.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CRM
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17
18 /**
19 * This class contains user jobs functionality.
20 */
21 class CRM_Core_BAO_UserJob extends CRM_Core_DAO_UserJob {
22
23 /**
24 * Get the statuses for Import Jobs.
25 *
26 * @return array
27 */
28 public static function getStatuses(): array {
29 return [
30 [
31 'id' => 1,
32 'name' => 'completed',
33 'label' => ts('Completed'),
34 ],
35 [
36 'id' => 2,
37 'name' => 'scheduled',
38 'label' => ts('Scheduled'),
39 ],
40 [
41 'id' => 3,
42 'name' => 'in_progress',
43 'label' => ts('In Progress'),
44 ],
45 ];
46 }
47
48 /**
49 * Get the types Import Jobs.
50 *
51 * This is largely a placeholder at this stage. It will likely wind
52 * up as an option value so extensions can add different types.
53 *
54 * However, for now it just holds the one type being worked on.
55 *
56 * @return array
57 */
58 public static function getTypes(): array {
59 return [
60 [
61 'id' => 1,
62 'name' => 'contact_import',
63 'label' => ts('Contact Import'),
64 ],
65 ];
66 }
67
68 }