本文整理汇总了PHP中Team::getAllTeams方法的典型用法代码示例。如果您正苦于以下问题:PHP Team::getAllTeams方法的具体用法?PHP Team::getAllTeams怎么用?PHP Team::getAllTeams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Team
的用法示例。
在下文中一共展示了Team::getAllTeams方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Team
<?php
if (!isset($data['params'])) {
$teams = $data['teams'];
$objTeam = $data['objTeam'];
} else {
$objTeam = new Team();
$teams = $objTeam->getAllTeams();
}
?>
<h2>Catergories
<!--
<span style="float:right;font-size:12px;cursor:pointer;"><a href="#" id="addTeam"><u>Add Team</u></a></span>
-->
</h2>
<table cellpadding="0" cellspacing="0" border="0" class="tbl_repeat" id="categoriesTable" style="margin-bottom:0px;" data-object="team">
<tr>
<th style="border-right:dashed 1px #222;width:120px;">Name</th>
<th style="width:50px;">EXCO</th>
<th style="width:50px;">Project</th>
<th>Action</th>
</tr>
<?php
foreach ($teams as $team) {
$disabledEXCO = '';
$disabledProject = '';
$disabled = '';
if ($team['exco'] == '1') {
$disabledEXCO = $objTeam->checkTeamExistsInInvolvements($team['id'], true);
}
示例2: getHistogram
public function getHistogram()
{
$clueStates = $this->getClueStates();
$teams = Team::getAllTeams();
if (count($clueStates) == 0) {
return "<span style=\"font-size: 12px;\"><b>All hidden</b></span>";
}
$counts = array(0, 0, 0, 0, 0);
foreach ($teams as $team) {
$clueState = $this->getClueState($team);
$state = $clueState ? $clueState->getState() : STATE_HIDDEN;
$counts[$state]++;
}
if ($counts[STATE_ANSWERED] == count($teams)) {
return "<span style=\"font-size: 12px;\"><b>All answered</b></span>";
}
$text = '';
foreach (State::getAllStates() as $key => $value) {
if ($text != '') {
$text .= ', ';
}
$text .= "<b>" . $counts[$key] . "</b> " . $value;
}
return '<span style="font-size: 12px;">' . $text . "</span>";
}
示例3: foreach
foreach ($members as $member) {
switch ($position) {
case POSITION_NONE:
return '';
case POSITION_ACCOUNT:
$text .= $member->getDisplayName() . ' ';
case POSITION_PLAYER:
case POSITION_ADMIN:
$text .= $member->getDisplayName() . ' (<i>';
$text .= $member->getPhoneNumber() . '</i>) ';
$text .= '<br />';
}
}
return $text;
}
$teams = Team::getAllTeams();
if (count($teams) == 0 && $position >= POSITION_ACCOUNT) {
$page->addElement('No teams');
}
foreach ($teams as $team) {
$page->addElement(UIText::exactText(team_summary($position, $team)));
$page->addElement(UIText::exactText(team_members($position, $team)));
}
if ($position >= POSITION_ADMIN) {
$page->addElement(UIText::exactText(<<<EOT
<form method="POST" action="teams.php">
Name: <input type="text" name="name" />
<input type="submit" name="new" value="Create New Team" />
</form>
EOT
)->setTitle('Create Team (Admin only)'));