/** * Function to process the form * * @access public * * @return None */ public function postProcess() { // note this also resets any ACL cache CRM_Core_BAO_Cache::deleteGroup('contact fields'); if ($this->_action & CRM_Core_Action::DELETE) { CRM_ACL_BAO_ACL::del($this->_id); CRM_Core_Session::setStatus(ts('Selected ACL has been deleted.')); } else { $params = $this->controller->exportValues($this->_name); $params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE); $params['deny'] = 0; $params['entity_table'] = 'civicrm_acl_role'; // Figure out which type of object we're permissioning on and set object_table and object_id. switch ($params['object_type']) { case 1: $params['object_table'] = 'civicrm_saved_search'; $params['object_id'] = $params['group_id']; break; case 2: $params['object_table'] = 'civicrm_uf_group'; $params['object_id'] = $params['uf_group_id']; break; case 3: $params['object_table'] = 'civicrm_custom_group'; $params['object_id'] = $params['custom_group_id']; break; case 4: $params['object_table'] = 'civicrm_event'; $params['object_id'] = $params['event_id']; break; } if ($this->_id) { $params['id'] = $this->_id; } CRM_ACL_BAO_ACL::create($params); } }