/** * process the form after the input has been submitted and validated * * @access public * * @return void */ public function postProcess() { $params = $this->controller->exportValues($this->_name); CRM_Badge_BAO_Badge::buildBadges($params, $this); }
public function buildPreview(&$params) { // get a max participant id $participantID = CRM_Core_DAO::singleValueQuery('select max(id) from civicrm_participant'); if (!$participantID) { CRM_Core_Session::setStatus(ts('Preview requires at least one event and one participant record. If you are just getting started, you can add a test participant record.'), ts('Preview Requirements'), 'alert'); return; } $this->_single = TRUE; $this->_participantIds = array($participantID); $this->_componentClause = " civicrm_participant.id = {$participantID} "; CRM_Badge_BAO_Badge::buildBadges($params, $this); }