_contactType; $class::buildQuickForm($this, 2); } /** * set defaults for the form * * @return array * @access public */ public function setDefaultValues() { $defaults = parent::setDefaultValues(); if ($this->_contactType == 'Individual') { // set current employer details $currentEmployer = CRM_Contact_BAO_Relationship::getCurrentEmployer(array($this->_contactId)); $defaults['current_employer_id'] = CRM_Utils_Array::value('org_id', $currentEmployer[$this->_contactId]); $this->assign('currentEmployer', CRM_Utils_Array::value('current_employer_id', $defaults)); } return $defaults; } /** * process the form * * @return void * @access public */ public function postProcess() { $params = $this->exportValues(); // Process / save contact info $params['contact_type'] = $this->_contactType; $params['contact_id'] = $this->_contactId; if (!empty($this->_contactSubType)) { $params['contact_sub_type'] = $this->_contactSubType; } CRM_Contact_BAO_Contact::create($params); $this->response(); } }