*/
public $_action;
- /**
- * This function sets the default values for the form. For edit/view mode
- * the default values are retrieved from the database
- *
- * @access public
- *
- * @return void
- */
- function setDefaultValues() {
- $parentDefaults = parent::setDefaultValues();
-
- $eventId = $this->_id;
- $params = array();
- $defaults = array();
- if (isset($eventId)) {
- $params = array('id' => $eventId);
- }
-
- CRM_Event_BAO_Event::retrieve($params, $defaults);
-
- $defaults = array_merge($defaults, $parentDefaults);
- $defaults['id'] = $eventId;
-
- return $defaults;
- }
-
/**
* Function to build the form
*
$params = array();
$params = $this->exportValues();
- if (trim($params['parent_event_name']) === '') {
- # believe me...
- $params['parent_event_id'] = '';
- }
- //update events table
$params['id'] = $this->_id;
CRM_Event_BAO_Event::add($params);