'id' => 'activity_import',
'name' => 'activity_import',
'label' => ts('Activity Import'),
+ 'entity' => 'Activity',
],
];
}
'id' => 'contact_import',
'name' => 'contact_import',
'label' => ts('Contact Import'),
+ 'entity' => 'Contact',
],
];
}
'id' => 'contribution_import',
'name' => 'contribution_import',
'label' => ts('Contribution Import'),
+ 'entity' => 'Contribution',
],
];
}
/**
* Get the types Import Jobs.
*
- * This is largely a placeholder at this stage. It will likely wind
- * up as an option value so extensions can add different types.
- *
- * However, for now it just holds the one type being worked on.
+ * Each type is keyed by it's id and has
+ * -id
+ * -name
+ * -label
+ * -class
+ * -entity
*
* @return array
*/
$types = [];
$classes = ClassScanner::get(['interface' => UserJobInterface::class]);
foreach ($classes as $class) {
+ /* @var UserJobInterface $class */
$declaredTypes = $class::getUserJobInfo();
foreach ($declaredTypes as $index => $declaredType) {
$declaredTypes[$index]['class'] = $class;
'id' => 'custom_field_import',
'name' => 'custom_field_import',
'label' => ts('Multiple Value Custom Field Import'),
+ 'entity' => 'Contact',
],
];
}
'id' => 'participant_import',
'name' => 'participant_import',
'label' => ts('Participant Import'),
+ 'entity' => 'Participant',
],
];
}
'id' => 'membership_import',
'name' => 'membership_import',
'label' => ts('Membership Import'),
+ 'entity' => 'Membership',
],
];
}