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 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * This class gets the name of the file to upload
21 class CRM_Event_Import_Form_DataSource
extends CRM_Import_Form_DataSource
{
23 const PATH
= 'civicrm/event/import';
25 const IMPORT_ENTITY
= 'Participant';
28 * Build the form object.
32 public function buildQuickForm() {
33 parent
::buildQuickForm();
35 $duplicateOptions = [];
36 $this->addRadio('onDuplicate', ts('On Duplicate Entries'), [
37 CRM_Import_Parser
::DUPLICATE_SKIP
=> ts('Skip'),
38 CRM_Import_Parser
::DUPLICATE_UPDATE
=> ts('Update'),
39 CRM_Import_Parser
::DUPLICATE_NOCHECK
=> ts('No Duplicate Checking'),
41 $this->setDefaults(['onDuplicate' => CRM_Import_Parser
::DUPLICATE_SKIP
]);
43 $this->addContactTypeSelector();
47 * Process the uploaded file.
51 public function postProcess() {
52 $this->storeFormValues([
59 $this->submitFileForMapping('CRM_Event_Import_Parser_Participant');