/** * Process the form submission. */ public function postProcess() { // store the submitted values in an array $params = $this->exportValues(); if ($this->_action == CRM_Core_Action::DELETE) { if ($this->_id) { CRM_Core_BAO_Mapping::del($this->_id); } } else { if ($this->_id) { $params['id'] = $this->_id; } CRM_Core_BAO_Mapping::add($params); } }
/** * Process the form submission. */ public function postProcess() { // store the submitted values in an array $params = $this->exportValues(); if ($this->_action == CRM_Core_Action::DELETE) { if ($this->_id) { CRM_Core_BAO_Mapping::del($this->_id); CRM_Core_Session::setStatus(ts('Selected mapping has been deleted successfully.'), ts('Deleted'), 'success'); } } else { if ($this->_id) { $params['id'] = $this->_id; } CRM_Core_BAO_Mapping::add($params); } }