/** * Build all the data structures needed to build the form. * * @return void */ public function preProcess() { // initialize the task and row fields parent::preProcess(); $session = CRM_Core_Session::singleton(); $this->_userContext = $session->readUserContext(); }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { /* * initialize the task and row fields */ parent::preProcess(); }
/** * Build all the data structures needed to build the form. */ public function preProcess() { CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this); parent::preProcess(); // we have all the participant ids, so now we get the contact ids parent::setContactIDs(); $this->assign('single', $this->_single); }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { //check for delete if (!CRM_Core_Permission::checkActionPermission('CiviEvent', CRM_Core_Action::DELETE)) { CRM_Core_Error::fatal(ts('You do not have permission to access this page')); } parent::preProcess(); }
/** * Build all the data structures needed to build the form. * * @return void */ public function preProcess() { // initialize the task and row fields parent::preProcess(); parent::setContactIDs(); $this->_context = $this->get('context'); $this->_id = $this->get('amtgID'); }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, false); if ($cid) { CRM_Contact_Form_Task_EmailCommon::preProcessSingle($this, $cid); } else { parent::preProcess(); // we have all the contribution ids, so now we get the contact ids parent::setContactIDs(); } $this->assign('single', $this->_single); }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { //check for delete if (!CRM_Core_Permission::checkActionPermission('CiviEvent', CRM_Core_Action::DELETE)) { CRM_Core_Error::fatal(ts('You do not have permission to access this page')); } parent::preProcess(); foreach ($this->_participantIds as $participantId) { if (CRM_Event_BAO_Participant::isPrimaryParticipant($participantId)) { $this->assign('additionalParticipants', TRUE); } } }
/** * Build all the data structures needed to build the form. * * @return void */ public function preProcess() { parent::preProcess(); $rows = array(); // display name and participation details of participants $participantIDs = implode(',', $this->_participantIds); $query = "\n SELECT p.fee_amount as amount,\n p.register_date as register_date,\n p.source as source,\n ct.display_name as display_name\n FROM civicrm_participant p\n INNER JOIN civicrm_contact ct ON ( p.contact_id = ct.id )\n WHERE p.id IN ( {$participantIDs} )"; $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray); while ($dao->fetch()) { $rows[] = array('display_name' => $dao->display_name, 'amount' => $dao->amount, 'register_date' => CRM_Utils_Date::customFormat($dao->register_date), 'source' => $dao->source); } $this->assign('rows', $rows); }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { /* * initialize the task and row fields */ parent::preProcess(); //get the contact read only fields to display. $readOnlyFields = array_merge(array('sort_name' => ts('Name')), CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_autocomplete_options', TRUE, NULL, FALSE, 'name', TRUE)); //get the read only field data. $returnProperties = array_fill_keys(array_keys($readOnlyFields), 1); $contactDetails = CRM_Contact_BAO_Contact_Utils::contactDetails($this->_participantIds, 'CiviEvent', $returnProperties); $this->assign('contactDetails', $contactDetails); $this->assign('readOnlyFields', $readOnlyFields); }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { /* * initialize the task and row fields */ parent::preProcess(); //get the contact read only fields to display. require_once 'CRM/Core/BAO/Preferences.php'; $readOnlyFields = array_merge(array('sort_name' => ts('Name')), CRM_Core_BAO_Preferences::valueOptions('contact_autocomplete_options', true, null, false, 'name', true)); //get the read only field data. $returnProperties = array_fill_keys(array_keys($readOnlyFields), 1); require_once 'CRM/Contact/BAO/Contact/Utils.php'; $contactDetails = CRM_Contact_BAO_Contact_Utils::contactDetails($this->_participantIds, 'CiviEvent', $returnProperties); $this->assign('contactDetails', $contactDetails); $this->assign('readOnlyFields', $readOnlyFields); }
/** * build all the data structures needed to build the form * * @param * * @return void * @access public */ function preProcess() { $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this); if ($this->_context == 'view') { $this->_single = TRUE; $participantID = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE); $contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE); $this->_participantIds = array($participantID); $this->_componentClause = " civicrm_participant.id = {$participantID} "; $this->assign('totalSelectedParticipants', 1); // also set the user context to send back to view page $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url('civicrm/contact/view/participant', "reset=1&action=view&id={$participantID}&cid={$contactID}")); } else { parent::preProcess(); } }
/** * Build all the data structures needed to build the form. * * @return void */ public function preProcess() { // initialize the task and row fields parent::preProcess(); $session = CRM_Core_Session::singleton(); $this->_userContext = $session->readUserContext(); CRM_Utils_System::setTitle(ts('Update multiple participants')); $validate = FALSE; //validations if (count($this->_participantIds) > $this->_maxParticipations) { CRM_Core_Session::setStatus("The maximum number of records you can select for Update multiple participants is {$this->_maxParticipations}. You have selected " . count($this->_participantIds) . ". Please select fewer participantions from your search results and try again."); $validate = TRUE; } // then redirect if ($validate) { CRM_Utils_System::redirect($this->_userContext); } }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { /* * initialize the task and row fields */ parent::preProcess(); $session =& CRM_Core_Session::singleton(); $this->_userContext = $session->readUserContext(); CRM_Utils_System::setTitle(ts('Batch Update for Event Participants')); $validate = false; //validations if (count($this->_participantIds) > $this->_maxParticipations) { CRM_Core_Session::setStatus("The maximum number of event participations you can select for Batch Update is {$this->_maxParticipations}. You have selected " . count($this->_participantIds) . ". Please select fewer participantions from your search results and try again."); $validate = true; } if ($validate) { // then redirect CRM_Utils_System::redirect($this->_userContext); } }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { parent::preProcess(); $this->_id = NULL; }
/** * build all the data structures needed to build the form * * @return void * @access public */ function preProcess() { parent::preProcess(); $this->_id = null; }