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 provides the register functionality from a search context.
21 * Originally the functionality was all munged into the main Participant form.
23 * Ideally it would be entirely separated but for now this overrides the main form,
24 * just providing a better separation of the functionality for the search vs main form.
26 class CRM_Event_Form_Task_Register
extends CRM_Event_Form_Participant
{
30 * Are we operating in "single mode", i.e. adding / editing only
31 * one participant record, or is this a batch add operation
33 * ote the goal is to disentangle all the non-single stuff
34 * into this form and discontinue this param.
38 public $_single = FALSE;
41 * Assign the url path to the template.
43 protected function assignUrlPath() {
44 //set the appropriate action
45 $context = $this->get('context');
46 $urlString = 'civicrm/contact/search';
47 $this->_action
= CRM_Core_Action
::BASIC
;
50 $urlString = 'civicrm/contact/search/advanced';
51 $this->_action
= CRM_Core_Action
::ADVANCED
;
55 $urlString = 'civicrm/contact/search/builder';
56 $this->_action
= CRM_Core_Action
::PROFILE
;
60 $urlString = 'civicrm/contact/search/basic';
61 $this->_action
= CRM_Core_Action
::BASIC
;
65 $urlString = 'civicrm/contact/search/custom';
66 $this->_action
= CRM_Core_Action
::COPY
;
69 CRM_Contact_Form_Task
::preProcessCommon($this);
71 $this->_contactId
= NULL;
73 //set ajax path, this used for custom data building
74 $this->assign('urlPath', $urlString);
75 $this->assign('urlPathVar', "_qf_Participant_display=true&qfKey={$this->controller->_key}");