Exemplo n.º 1
0
 /**
  * 
  * @param int $nefubId
  */
 public function showClub($nefubId)
 {
     $this->subdirectory = '/club';
     $this->path = '/' . $nefubId;
     $this->template = '/club/club.tpl';
     if ($this->getClearRender()) {
         $oClub = Club::getByNefubId($nefubId);
         if ($oClub) {
             $competitionGenders = array('Heren', 'Dames', 'Mixed');
             $aCompetitions = array();
             foreach ($competitionGenders as $competitionGender) {
                 $oGender = Gender::getByNefubName($competitionGender);
                 $aGenreCompetitions = Competition::getAll(array('gender_id' => $oGender->getId(), 'season_nefub_id' => $this->season->nefub_id), 'genre_id`,`name');
                 $aCompetitions = array_merge($aCompetitions, $aGenreCompetitions);
             }
             $aCompetitionTeams = array();
             foreach ($aCompetitions as $oCompetition) {
                 $aTeams = Team::getAll(array('competition_nefub_id' => $oCompetition->nefub_id, 'club_nefub_id' => $oClub->nefub_id, 'season_nefub_id' => $oCompetition->season_nefub_id), 'name');
                 if (count($aTeams)) {
                     $aCompetitionTeams[] = array('competition' => $oCompetition, 'teams' => $aTeams);
                 }
             }
             $this->assign('oClub', $oClub);
             $this->assign('aCompetitionTeams', $aCompetitionTeams);
         } else {
             $this->redirect();
         }
     }
     $this->showOutput();
 }
Exemplo n.º 2
0
 /**
  * 
  * Enter description here ...
  * @param string $template
  */
 protected function showCompetitionDependentView($template = '/list.tpl')
 {
     $aCompetitions = Competition::getAll(array('season_nefub_id' => Season::getInstance()->nefub_id));
     $this->assign('aCompetitions', $aCompetitions);
     $this->template = $template;
     $this->showOutput();
 }