Пример #1
0
 /**
  * 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);
 }
Пример #2
0
 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);
 }