本文整理汇总了PHP中Club::getByNefubId方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::getByNefubId方法的具体用法?PHP Club::getByNefubId怎么用?PHP Club::getByNefubId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::getByNefubId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getClub
/**
* @return Club
*/
public function getClub()
{
if (!$this->club) {
$this->club = Club::getByNefubId($this->club_nefub_id);
}
return $this->club;
}
示例2: 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();
}
示例3: convertClub
/**
*
* @param stdClass $club
* return Club
*/
protected function convertClub(stdClass $club)
{
$oClub = Club::getByNefubId($club->ID);
if (!$oClub) {
$oClub = new Club();
$oClub->nefub_id = $club->ID;
$oClub->name = $club->Name;
$oClub->city = $club->Place;
if ($club->Website) {
$oClub->website = 'http://' . str_replace('http://', '', $club->Website);
}
$oClub->email = $club->Email;
$oClub->save();
}
return $oClub;
}
示例4: showClubs
protected function showClubs()
{
switch ($this->mode) {
case 'bewerken':
$oClub = Club::getByNefubId($this->editId);
$this->editObject($oClub);
break;
default:
$aClubs = Club::getAll(array(), 'name');
$this->assign('aClubs', $aClubs);
$this->template = '/clubs.tpl';
$this->showOutput();
}
}