当前位置: 首页>>代码示例>>PHP>>正文


PHP Team::getAll方法代码示例

本文整理汇总了PHP中Team::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Team::getAll方法的具体用法?PHP Team::getAll怎么用?PHP Team::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Team的用法示例。


在下文中一共展示了Team::getAll方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showClub

 /**
  * 
  * @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();
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:34,代码来源:FrontRenderer.php

示例2: buildSearchTable

 /**
  * 
  */
 public function buildSearchTable()
 {
     self::put('Zoekresultaten maken');
     // Personen
     $aPersons = Person::getAll();
     $personCount = 0;
     $deletePersonCount = 0;
     foreach ($aPersons as $oPerson) {
         $query = "SELECT DISTINCT(Team.competition_nefub_id), Competition.id\n\t\t\t\t\t\tFROM TeamPerson\n\t\t\t\t\t\tLEFT JOIN Team ON Team.nefub_id = TeamPerson.team_nefub_id\n\t\t\t\t\t\tLEFT JOIN Competition ON Team.competition_nefub_id = Competition.nefub_id\n\t\t\t\t\t\tWHERE TeamPerson.person_nefub_id = '" . $oPerson->nefub_id . "'\n\t\t\t\t\t\tAND Competition.season_nefub_id  = '" . Season::getInstance()->nefub_id . "'\n\t\t\t\t\t\tORDER BY Team.competition_nefub_id ASC";
         $aCompetitions = Competition::getAllFromQuery($query);
         $personCompetitions = array();
         foreach ($aCompetitions as $oCompetition) {
             if (trim($oCompetition->name)) {
                 $personCompetitions[] = $oCompetition->name;
             }
         }
         if (count($personCompetitions)) {
             $oSearchResult = SearchResult::selectByNefubId($oPerson->nefub_id, 'person');
             if (!$oSearchResult) {
                 $oSearchResult = new SearchResult();
                 $oSearchResult->nefub_id = $oPerson->nefub_id;
                 $oSearchResult->type = 'person';
                 $oSearchResult->url = '/persoon/' . $oPerson->nefub_id;
                 $personCount++;
             }
             $oSearchResult->name = $oPerson->name;
             $oSearchResult->subtitle = implode(', ', $personCompetitions);
             $oSearchResult->save();
         } else {
             $deletePersonCount += Database::delete_rows('SearchResult', array('nefub_id' => $oPerson->nefub_id, 'type' => 'person'));
         }
     }
     self::put($deletePersonCount . ' perso(o)n(en) verwijderd van zoekresultatenlijst');
     self::put($personCount . ' perso(o)n(en) toegevoegd aan zoekresultatenlijst');
     // Teams
     $aTeams = Team::getAll();
     $teamCount = 0;
     $deleteTeamCount = 0;
     foreach ($aTeams as $oTeam) {
         if ($oTeam->getCompetition() && $oTeam->season_nefub_id == Season::getInstance()->nefub_id) {
             $oSearchResult = SearchResult::selectByNefubId($oTeam->nefub_id, 'team');
             if (!$oSearchResult) {
                 $oSearchResult = new SearchResult();
                 $oSearchResult->nefub_id = $oTeam->nefub_id;
                 $oSearchResult->name = $oTeam->name;
                 $oSearchResult->type = 'team';
                 $oSearchResult->url = '/team/' . $oTeam->nefub_id;
                 $teamCount++;
             }
             $oSearchResult->subtitle = $oTeam->getCompetition()->name;
             $oSearchResult->save();
         } else {
             $deleteTeamCount += Database::delete_rows('SearchResult', array('nefub_id' => $oTeam->nefub_id, 'type' => 'team'));
         }
     }
     self::put($deleteTeamCount . ' team(s) verwijderd van zoekresultatenlijst');
     self::put($teamCount . ' team(s) toegevoegd aan zoekresultatenlijst');
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:61,代码来源:MapperRetriever.php

示例3: getTeams

 /**
  * @return
  */
 public function getTeams()
 {
     return Team::getAll(array('club_nefub_id' => $this->nefub_id));
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:7,代码来源:Club.php

示例4: getTeams

 /**
  * 
  * @return array
  */
 public function getTeams()
 {
     return Team::getAll(array('competition_nefub_id' => $this->nefub_id), 'name');
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:8,代码来源:Competition.php

示例5: getSimilarTeamNefubIds

 public function getSimilarTeamNefubIds($includeSelf = true)
 {
     $similarTeamNefubIds = array();
     $aTeams = Team::getAll(array('gender_id' => $this->gender_id, 'name' => $this->name));
     foreach ($aTeams as $oTeam) {
         $similarTeamNefubIds[] = $oTeam->nefub_id;
     }
     return $similarTeamNefubIds;
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:9,代码来源:Team.php

示例6: getTeamsRanks

 private function getTeamsRanks(Team $team)
 {
     return $team->getAll();
 }
开发者ID:jager,项目名称:cms,代码行数:4,代码来源:Rank.php


注:本文中的Team::getAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。