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


PHP Team::getAllTeams方法代码示例

本文整理汇总了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);
    }
开发者ID:nguyengiangoc,项目名称:SugarKMS,代码行数:31,代码来源:team_categories.php

示例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>";
 }
开发者ID:rjwalsh88,项目名称:BawkApp,代码行数:25,代码来源:Clue.php

示例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)'));
开发者ID:rjwalsh88,项目名称:BawkApp,代码行数:31,代码来源:teams.php


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