/**
* particpant values
*
- * @array string
+ * @var string
*/
protected $_part_values;
/**
* details
*
- * @array string
+ * @var array
*/
protected $_details = [];
/**
* line items
*
- * @array string
+ * @var array
*/
protected $_line_items = [];
/**
* contact_id
*
- * @array string
+ * @var int
*/
protected $contact_id;
/**
* Is backoffice form?
*
- * @array bool
+ * @var bool
*/
protected $isBackoffice = FALSE;
$query = "select event_id from civicrm_participant where contact_id = " . $contact_id;
$dao = CRM_Core_DAO::executeQuery($query);
while ($dao->fetch()) {
- $to_event_id[] = $dao->event_id;
+ $to_event_id[] = $dao->event_id;
}
if (!empty($to_event_id)) {
foreach ($to_event_id as $id) {
}
$value_to['contact_id'] = $contact_id;
$value_to['event_id'] = $this->_event_id;
- $value_to['status_id'] = 1;
+ $value_to['status_id'] = CRM_Core_PseudoConstant::getKey(
+ 'CRM_Event_BAO_Participant',
+ 'status_id',
+ 'Registered'
+ );
$value_to['register_date'] = date("Y-m-d");
//first create the new participant row -don't set registered_by yet or email won't be sent
$participant = CRM_Event_BAO_Participant::create($value_to);