예제 #1
0
 function __construct()
 {
     parent::__construct();
     // get current tournament, i.e., latest active event of type 'Tournament'
     $apiParams = array('event_type_id' => $this->tournament_event_type_id(), 'is_active' => 1, 'options' => array('sort' => 'start_date DESC'));
     $this->event = $this->civicrm_api3_get('Event', $apiParams, 'getsingle');
     if (isset($this->event['error'])) {
         $this->is_error = true;
         $this->error_message = $this->event['error'];
     }
 }
예제 #2
0
 function __construct($contact_id)
 {
     parent::__construct();
     $this->tournament = new Tournament();
     if ($this->tournament->is_error) {
         $this->is_error = true;
         $this->error_message = $this->tournament->error_message;
         return;
     }
     $this->contact = $this->get_contact($contact_id);
     $this->organization = $this->get_billing_organization();
     $this->members = $this->get_members($this->organization);
     $this->registrationProfiles = $this->get_registrationProfiles($contact_id);
 }