<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
protected $_newParticipants;
/**
- * class constructor
+ * Class constructor
*/
- function __construct(&$mapperKeys, $mapperLocType = NULL, $mapperPhoneType = NULL) {
+ public function __construct(&$mapperKeys, $mapperLocType = NULL, $mapperPhoneType = NULL) {
parent::__construct();
$this->_mapperKeys = &$mapperKeys;
}
/**
- * the initializer code, called before the processing
+ * The initializer code, called before the processing
*
* @return void
- * @access public
*/
- function init() {
+ public function init() {
$fields = CRM_Event_BAO_Participant::importableFields($this->_contactType, FALSE);
$fields['event_id']['title'] = 'Event ID';
$eventfields = &CRM_Event_BAO_Event::fields();
}
/**
- * handle the values in mapField mode
+ * Handle the values in mapField mode
*
- * @param array $values the array of values belonging to this line
+ * @param array $values
+ * The array of values belonging to this line.
*
* @return boolean
- * @access public
*/
- function mapField(&$values) {
+ public function mapField(&$values) {
return CRM_Import_Parser::VALID;
}
/**
- * handle the values in preview mode
+ * Handle the values in preview mode
*
- * @param array $values the array of values belonging to this line
+ * @param array $values
+ * The array of values belonging to this line.
*
- * @return boolean the result of this processing
- * @access public
+ * @return boolean
+ * the result of this processing
*/
- function preview(&$values) {
+ public function preview(&$values) {
return $this->summary($values);
}
/**
- * handle the values in summary mode
+ * Handle the values in summary mode
*
- * @param array $values the array of values belonging to this line
+ * @param array $values
+ * The array of values belonging to this line.
*
- * @return boolean the result of this processing
- * @access public
+ * @return boolean
+ * the result of this processing
*/
- function summary(&$values) {
+ public function summary(&$values) {
$erroneousField = NULL;
$response = $this->setActiveFieldValues($values, $erroneousField);
}
/**
- * handle the values in import mode
+ * Handle the values in import mode
*
- * @param int $onDuplicate the code for what action to take on duplicates
- * @param array $values the array of values belonging to this line
+ * @param int $onDuplicate
+ * The code for what action to take on duplicates.
+ * @param array $values
+ * The array of values belonging to this line.
*
- * @return boolean the result of this processing
- * @access public
+ * @return boolean
+ * the result of this processing
*/
- function import($onDuplicate, &$values) {
+ public function import($onDuplicate, &$values) {
// first make sure this is a valid line
$response = $this->summary($values);
$params[$key] = CRM_Utils_String::strtoboolstr($val);
}
}
- if($key == 'participant_register_date') {
+ if ($key == 'participant_register_date') {
CRM_Utils_Date::convertToDefaultDate($params, $dateType, 'participant_register_date');
$formatted['participant_register_date'] = CRM_Utils_Date::processDate($params['participant_register_date']);
}
if (!empty($formatted['fee_level'])) {
$otherParams = array(
'fee_label' => $formatted['fee_level'],
- 'event_id' => $newParticipant->event_id
+ 'event_id' => $newParticipant->event_id,
);
CRM_Price_BAO_LineItem::syncLineItems($newParticipant->id, 'civicrm_participant', $newParticipant->fee_amount, $otherParams);
}
* Get the array of successfully imported Participation ids
*
* @return array
- * @access public
*/
- function &getImportedParticipations() {
+ public function &getImportedParticipations() {
return $this->_newParticipants;
}
/**
- * the initializer code, called before the processing
+ * The initializer code, called before the processing
*
* @return void
- * @access public
*/
- function fini() {}
+ public function fini() {}
}
-