Save different type_id per import
[civicrm-core.git] / CRM / Core / BAO / UserJob.php
index 193d7186e09bd9378c908621d7d3eaaf9e383e07..7802f4a4ba32761df2c51b919c4b7b82daa866dc 100644 (file)
@@ -32,7 +32,11 @@ class CRM_Core_BAO_UserJob extends CRM_Core_DAO_UserJob {
    * @inheritDoc
    */
   public function addSelectWhereClause(): array {
-    $clauses['created_id'] = '= ' . (int) CRM_Core_Session::getLoggedInContactID();
+    $clauses = [];
+    if (!\CRM_Core_Permission::check('administer queues')) {
+      $clauses['created_id'] = '= ' . (int) CRM_Core_Session::getLoggedInContactID();
+    }
+    CRM_Utils_Hook::selectWhereClause($this, $clauses);
     return $clauses;
   }
 
@@ -82,6 +86,37 @@ class CRM_Core_BAO_UserJob extends CRM_Core_DAO_UserJob {
         'id' => 1,
         'name' => 'contact_import',
         'label' => ts('Contact Import'),
+        'class' => 'CRM_Contact_Import_Parser_Contact',
+      ],
+      [
+        'id' => 2,
+        'name' => 'contribution_import',
+        'label' => ts('Contribution Import'),
+        'class' => 'CRM_Contribute_Import_Parser_Contribution',
+      ],
+      [
+        'id' => 3,
+        'name' => 'membership_import',
+        'label' => ts('Membership Import'),
+        'class' => 'CRM_Member_Import_Parser_Membership',
+      ],
+      [
+        'id' => 4,
+        'name' => 'activity_import',
+        'label' => ts('Activity Import'),
+        'class' => 'CRM_Activity_Import_Parser_Activity',
+      ],
+      [
+        'id' => 5,
+        'name' => 'participant_import',
+        'label' => ts('Participant Import'),
+        'class' => 'CRM_Event_Import_Parser_Participant',
+      ],
+      [
+        'id' => 6,
+        'name' => 'custom_field_import',
+        'label' => ts('Multiple Value Custom Field Import'),
+        'class' => 'CRM_Custom_Import_Parser_Api',
       ],
     ];
   }