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


PHP Team::GetName方法代码示例

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


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

示例1: OnLoadPageData

 public function OnLoadPageData()
 {
     # Read the player data if (a) it's not a new player and (b) it's not in the postback data
     if ($this->player->GetId() and !$this->IsPostback()) {
         $this->player_manager->ReadPlayerById($this->player->GetId());
         $this->player = $this->player_manager->GetFirst();
     }
     unset($this->player_manager);
     # ensure we have a player
     if (!$this->player instanceof Player) {
         $this->Redirect();
     }
     # if it's a new player, get the team details
     if (!$this->player->GetId() or $this->add_player_already_exists) {
         if (!$this->team instanceof Team) {
             require_once "stoolball/team-manager.class.php";
             $team_manager = new TeamManager($this->GetSettings(), $this->GetDataConnection());
             $team_manager->ReadById(array($this->player->Team()->GetId()));
             $this->team = $team_manager->GetFirst();
             unset($team_manager);
         }
         $this->player->Team()->SetName($this->team->GetName());
         $this->player->Team()->SetShortUrl($this->team->GetShortUrl());
     }
     # ensure we have permission
     $this->CheckForPermission($this->player->Team());
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:27,代码来源:playeredit.php

示例2: __construct

 /**
  * Create new TeamNameControl
  * @param Team $team
  * @param string $container_element
  */
 public function __construct(Team $team, $container_element)
 {
     parent::XhtmlElement($container_element);
     $name = $team->GetName();
     $type = is_null($team->GetPlayerType()) ? '' : PlayerType::Text($team->GetPlayerType());
     if ($type and strpos(strtolower(str_replace("'", '', $name)), strtolower(str_replace("'", '', $type))) !== false) {
         $type = "";
     }
     $town = (is_null($team->GetGround()) or is_null($team->GetGround()->GetAddress())) ? "" : $team->GetGround()->GetAddress()->GetTown();
     if ($town and strpos(strtolower($name), strtolower($town)) !== false) {
         $town = "";
     }
     if ($type or $town) {
         $html = '<span property="schema:name">' . htmlentities($name, ENT_QUOTES, "UTF-8", false) . '</span>';
         if ($town) {
             $html .= htmlentities(", {$town}", ENT_QUOTES, "UTF-8", false);
         }
         if ($type) {
             $html .= htmlentities(" ({$type})", ENT_QUOTES, "UTF-8", false);
         }
         $this->AddControl($html);
     } else {
         $this->AddAttribute("property", "schema:name");
         $this->AddControl(htmlentities($name, ENT_QUOTES, "UTF-8", false));
     }
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:31,代码来源:team-name-control.class.php

示例3: OnPrePageLoad

 function OnPrePageLoad()
 {
     $this->SetPageTitle(is_object($this->team) ? $this->team->GetName() . ': Edit stoolball team' : 'New stoolball team');
     $this->SetContentConstraint(StoolballPage::ConstrainText());
     $this->LoadClientScript("/scripts/tiny_mce/jquery.tinymce.js");
     $this->LoadClientScript("/scripts/tinymce.js");
     $this->LoadClientScript("edit-team.js", true);
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:8,代码来源:teamedit.php

示例4: OnPrePageLoad

 function OnPrePageLoad()
 {
     if ($this->team instanceof Team) {
         $this->SetPageTitle('New tournament for ' . $this->team->GetName());
     } else {
         $this->SetPageTitle('New stoolball tournament');
     }
     $this->SetContentCssClass('matchEdit');
     $this->SetContentConstraint(StoolballPage::ConstrainText());
     $this->LoadClientScript('/scripts/tournament-edit-control-3.js');
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:11,代码来源:add.php

示例5: BuildPostedItem

 /**
  * Re-build from data posted by this control a single data object which this control is editing
  *
  * @param int $i_counter
  * @param int $i_id
  */
 protected function BuildPostedItem($i_counter = null, $i_id = null)
 {
     $s_key = $this->GetNamingPrefix() . 'Team' . $i_counter;
     $team = new Team($this->GetSettings());
     if (isset($_POST[$s_key]) and is_numeric($_POST[$s_key])) {
         $team->SetId($_POST[$s_key]);
     }
     $s_key = $this->GetNamingPrefix() . 'TeamValue' . $i_counter;
     if (isset($_POST[$s_key])) {
         $team->SetName($_POST[$s_key]);
     }
     # Infer player type from name
     if (stristr($team->GetName(), "ladies")) {
         $team->SetPlayerType(PlayerType::LADIES);
     } else {
         if (stristr($team->GetName(), "mixed")) {
             $team->SetPlayerType(PlayerType::MIXED);
         } else {
             if (stristr($team->GetName(), "Junior mixed")) {
                 $team->SetPlayerType(PlayerType::JUNIOR_MIXED);
             } else {
                 if (stristr($team->GetName(), "junior") or stristr($team->GetName(), "girls")) {
                     $team->SetPlayerType(PlayerType::GIRLS);
                 }
             }
         }
     }
     if ($team->GetId() or $team->GetName()) {
         $this->DataObjects()->Add($team);
     } else {
         $this->IgnorePostedItem($i_counter);
     }
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:39,代码来源:teams-in-tournament-editor.class.php

示例6: OnPageLoad

    function OnPageLoad()
    {
        echo new XhtmlElement('h1', 'Delete team: ' . htmlentities($this->data_object->GetName(), ENT_QUOTES, "UTF-8", false));
        if ($this->deleted) {
            ?>
			<p>The team has been deleted.</p>
			<p><a href="/teams">View all teams</a></p>
			<?php 
        } else {
            if ($this->has_permission) {
                ?>
				<p>Deleting a team cannot be undone. All players will be deleted, and the team will be removed from existing matches.</p>
				<p>Are you sure you want to delete this team?</p>
				<form action="<?php 
                echo htmlentities($this->data_object->GetDeleteTeamUrl(), ENT_QUOTES, "UTF-8", false);
                ?>
" method="post" class="deleteButtons">
				<div>
				<input type="submit" value="Delete team" name="delete" />
				<input type="submit" value="Cancel" name="cancel" />
				</div>
				</form>
				<?php 
                $this->AddSeparator();
                require_once 'stoolball/user-edit-panel.class.php';
                $panel = new UserEditPanel($this->GetSettings(), 'this team');
                $panel->AddLink('view this team', $this->data_object->GetNavigateUrl());
                $panel->AddLink('edit this team', $this->data_object->GetEditTeamUrl());
                echo $panel;
            } else {
                ?>
				<p>Sorry, you're not allowed to delete this team.</p>
				<p><a href="<?php 
                echo htmlentities($this->data_object->GetNavigateUrl(), ENT_QUOTES, "UTF-8", false);
                ?>
">Go back to the team</a></p>
				<?php 
            }
        }
    }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:40,代码来源:teamdelete.php

示例7: OnPrePageLoad

 function OnPrePageLoad()
 {
     if (isset($this->i_season_id)) {
         $this->SetPageTitle('New ' . MatchType::Text($this->i_match_type) . ' in ' . $this->season->GetCompetitionName());
     } else {
         if ($this->team instanceof Team) {
             $this->SetPageTitle('New ' . MatchType::Text($this->i_match_type) . ' for ' . $this->team->GetName());
         }
     }
     $this->SetContentConstraint(StoolballPage::ConstrainText());
     $this->SetContentCssClass('matchEdit');
     $this->LoadClientScript('/scripts/match-fixture-edit-control-5.js');
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:13,代码来源:matchadd.php

示例8: __construct

 public function __construct(Team $team)
 {
     $this->team = $team;
     $this->searchable = new SearchItem();
     $this->searchable->SearchItemId("team" . $team->GetId());
     $this->searchable->SearchItemType("team");
     $this->searchable->Url($team->GetNavigateUrl());
     $this->searchable->Title($team->GetNameAndType());
     $this->searchable->Description($this->GetSearchDescription());
     $this->searchable->WeightOfType(1000);
     $keywords = array($team->GetName(), $team->GetGround()->GetAddress()->GetLocality(), $team->GetGround()->GetAddress()->GetTown());
     $this->searchable->Keywords(implode(" ", $keywords));
     $content = array($team->GetGround()->GetAddress()->GetAdministrativeArea(), $team->GetIntro(), $team->GetPlayingTimes(), $team->GetCost(), $team->GetContact());
     $this->searchable->FullText(implode(" ", $content));
     $this->searchable->RelatedLinksHtml('<ul>' . '<li><a href="' . $team->GetStatsNavigateUrl() . '">Statistics</a></li>' . '<li><a href="' . $team->GetPlayersNavigateUrl() . '">Players</a></li>' . '<li><a href="' . $team->GetCalendarNavigateUrl() . '">Match calendar</a></li>' . '</ul>');
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:16,代码来源:team-search-adapter.class.php

示例9: OnPrePageLoad

    function OnPrePageLoad()
    {
        $this->SetOpenGraphType("sports_team");
        $this->SetPageTitle($this->team->GetName() . ' stoolball team');
        require_once "search/team-search-adapter.class.php";
        $adapter = new TeamSearchAdapter($this->team);
        $this->SetPageDescription($adapter->GetSearchDescription());
        $this->SetContentConstraint(StoolballPage::ConstrainColumns());
        if (!$this->is_one_time_team) {
            $this->LoadClientScript("/scripts/lib/chart.min.js");
            $this->LoadClientScript("/scripts/chart.js?v=2");
            $this->LoadClientScript("team.js", true);
            ?>
<!--[if lte IE 8]><script src="/scripts/lib/excanvas.compiled.js"></script><![endif]--><?php 
        }
    }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:16,代码来源:team.php

示例10: OnPrePageLoad

 function OnPrePageLoad()
 {
     if (!is_null($this->team)) {
         $this->SetPageTitle('Match results for ' . $this->team->GetName());
     } else {
         if (!is_null($this->season)) {
             $this->SetPageTitle('Match results for ' . $this->season->GetCompetitionName());
         } else {
             if (!is_null($this->tournament)) {
                 $this->SetPageTitle('Match results for ' . $this->tournament->GetTitle());
             }
         }
     }
     $this->LoadClientScript('/scripts/match-results-3.js');
     $this->LoadClientScript("/scripts/tiny_mce/jquery.tinymce.js");
     $this->LoadClientScript("/scripts/tinymce.js");
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:17,代码来源:results.php

示例11: NameTeams

 /**
  * Replace the words "home" and "away" with the names of the relevant teams
  *
  * @param string $s_text
  * @param Team $o_home
  * @param Team $o_away
  * @return string
  */
 private function NameTeams($s_text, Team $o_home, Team $o_away)
 {
     $s_text = str_ireplace('Home', $o_home->GetName(), $s_text);
     $s_text = str_ireplace('Away', $o_away->GetName(), $s_text);
     return $s_text;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:14,代码来源:match-highlights-edit-control.class.php

示例12: GetTeamName

 /**
  * Gets the name of the team
  *
  * @return string
  */
 public function GetTeamName()
 {
     return $this->team instanceof Team ? $this->team->GetName() : null;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:9,代码来源:team-in-season.class.php

示例13: OnPageLoad

    function OnPageLoad()
    {
        require_once 'stoolball/statistics-calculator.class.php';
        $calculator = new StatisticsCalculator();
        $calculator->AnalyseMatchData($this->stats, $this->team);
        $title = "Team statistics for " . $this->team->GetNameAndType();
        if ($this->season) {
            $title .= " in the {$this->season} season";
        }
        echo "<h1>" . htmlentities($title, ENT_QUOTES, "UTF-8", false) . "</h1>";
        # See what stats we've got available
        $has_team_stats = $calculator->EnoughDataForStats($this->season);
        $has_most_runs = count($this->most_runs);
        $has_most_wickets = count($this->most_wickets);
        $has_catch_stats = count($this->most_catches);
        $has_run_outs = count($this->most_run_outs);
        $has_player_of_match_stats = count($this->most_player_of_match);
        $has_player_stats = ($has_most_runs or $has_most_wickets or $has_catch_stats or $has_run_outs or $has_player_of_match_stats);
        require_once 'xhtml/navigation/tabs.class.php';
        $tabs = array('Summary' => $this->team->GetNavigateUrl());
        if ($has_player_stats) {
            $tabs['Players'] = $this->team->GetPlayersNavigateUrl();
        }
        $tabs['Statistics'] = '';
        echo new Tabs($tabs);
        ?>
        <div class="box tab-box">
            <div class="dataFilter"></div>
            <div class="box-content">
        <?php 
        if (!$has_team_stats and !$has_player_stats) {
            $scope = $this->team->GetNameAndType();
            if ($this->season) {
                $scope .= " in the {$this->season} season";
            }
            $scope = htmlentities($scope, ENT_QUOTES, "UTF-8", false);
            echo "<p>There aren't any statistics for {$scope} yet.</p>" . '<p>To find out how to add them, see <a href="/play/manage/website/matches-and-results-why-you-should-add-yours/">Matches and results - why you should add yours</a>.</p>';
        } else {
            require_once 'stoolball/team-runs-table.class.php';
            require_once 'stoolball/statistics/player-statistics-table.class.php';
            echo '<div class="statsGroup">';
            if ($has_team_stats or $has_most_runs) {
                echo '<div class="statsColumns">
				<h2>Batting statistics</h2>
				<div class="statsColumn">';
                if ($has_most_runs) {
                    echo new PlayerStatisticsTable("Most runs", "Runs", $this->most_runs, false);
                    if ($has_most_runs >= 10) {
                        echo '<p class="statsViewAll"><a href="/play/statistics/most-runs' . $this->statistics_query . '">Most runs &#8211; view all and filter</a></p>';
                    }
                }
                echo "</div><div class=\"statsColumn\">";
                if ($has_team_stats) {
                    echo new TeamRunsTable($calculator->TotalMatchesWithRunData($this->season), $calculator->RunsScored($this->season), $calculator->RunsConceded($this->season), $calculator->HighestInnings($this->season), $calculator->LowestInnings($this->season), $calculator->AverageInnings($this->season));
                }
                if ($has_most_runs) {
                    echo '<p class="statsViewAll"><a href="/play/statistics/individual-scores' . $this->statistics_query . '">Individual scores</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/most-scores-of-100' . $this->statistics_query . '">Most scores of 100 or more</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/most-scores-of-50' . $this->statistics_query . '">Most scores of 50 or more</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/batting-average' . $this->statistics_query . '">Batting averages</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/batting-strike-rate' . $this->statistics_query . '">Batting strike rates</a></p>';
                }
                echo "</div></div>";
            }
            if ($has_most_wickets or $has_team_stats) {
                echo '<div class="statsColumns">
					<h2>Bowling statistics and match results</h2>
					  <div class="statsColumn">';
                if ($has_most_wickets) {
                    # Show top bowlers
                    $table = new PlayerStatisticsTable("Most wickets", "Wickets", $this->most_wickets, false);
                    $table->SetCssClass($table->GetCssClass() . " bowling");
                    echo $table;
                    if ($has_most_wickets >= 10) {
                        echo '<p class="statsViewAll"><a href="/play/statistics/most-wickets' . $this->statistics_query . '">Most wickets &#8211; view all and filter</a></p>';
                    }
                    echo '<p class="statsViewAll"><a href="/play/statistics/most-5-wickets' . $this->statistics_query . '">Most times taking 5 wickets in an innings</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/most-wickets-by-bowler-and-catcher' . $this->statistics_query . '">Most wickets by a bowling and catching combination</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/bowling-performances' . $this->statistics_query . '">Bowling performances</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/bowling-average' . $this->statistics_query . '">Bowling averages</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/economy-rate' . $this->statistics_query . '">Economy rates</a></p>';
                    echo '<p class="statsViewAll"><a href="/play/statistics/bowling-strike-rate' . $this->statistics_query . '">Bowling strike rates</a></p>';
                }
                ?>
					</div><div class="statsColumn">
                        <span class="chart-js-template" id="all-results-chart"></span>
                        <span class="chart-js-template" id="home-results-chart"></span>
                        <span class="chart-js-template" id="away-results-chart"></span>
					</div></div>
                    <?php 
            }
            ?>
<span class="chart-js-template" id="opponents-chart"></span><?php 
            if ($has_catch_stats or $has_run_outs) {
                echo '<div class="statsColumns">
				<h2>Fielding statistics</h2>
				<div class="statsColumn">';
                if ($has_catch_stats) {
                    # Show top catchers
                    $table = new PlayerStatisticsTable("Most catches", "Catches", $this->most_catches, false);
//.........这里部分代码省略.........
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:101,代码来源:summary-team.php

示例14: CreateTeamLink

 private function CreateTeamLink(Team $team)
 {
     $span = new XhtmlElement('span');
     $span->AddAttribute("typeof", "schema:SportsTeam");
     $span->AddAttribute("about", $team->GetLinkedDataUri());
     $link = new XhtmlElement('a', Html::Encode($team->GetName()));
     $link->AddAttribute("property", "schema:name");
     $link->AddAttribute('href', $team->GetNavigateUrl());
     $link->AddAttribute("rel", "schema:url");
     $span->AddControl($link);
     return $span;
 }
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:12,代码来源:match-control.class.php

示例15: CreateScorecardControls

 /**
  * Sets up controls for pages 2/3 of the wizard
  * @param Match $match
  * @param Team $batting_team
  * @param Collection $batting_data
  * @param Team $bowling_team
  * @param Collection $bowling_data
  * @param int $total
  * @param int $wickets_taken
  * @return void
  */
 private function CreateScorecardControls(Match $match, Team $batting_team, Collection $batting_data, Team $bowling_team, Collection $bowling_data, $total, $wickets_taken)
 {
     require_once "xhtml/tables/xhtml-table.class.php";
     $batting_table = new XhtmlTable();
     $batting_table->SetCaption($batting_team->GetName() . "'s batting");
     $batting_table->SetCssClass("scorecard scorecardEditor batting");
     $out_by_header = new XhtmlCell(true, '<span class="small">Fielder</span><span class="large">Caught<span class="wrapping-hair-space"> </span>/<span class="wrapping-hair-space"> </span><span class="nowrap">run-out by</span></span>');
     $out_by_header->SetCssClass("dismissedBy");
     $bowler_header = new XhtmlCell(true, "Bowler");
     $bowler_header->SetCssClass("bowler");
     $score_header = new XhtmlCell(true, "Runs");
     $score_header->SetCssClass("numeric");
     $balls_header = new XhtmlCell(true, "Balls");
     $balls_header->SetCssClass("numeric");
     $batting_headings = new XhtmlRow(array("Batsman", "How out", $out_by_header, $bowler_header, $score_header, $balls_header));
     $batting_headings->SetIsHeader(true);
     $batting_table->AddRow($batting_headings);
     $batting_data->ResetCounter();
     $byes = null;
     $wides = null;
     $no_balls = null;
     $bonus = null;
     # Loop = max players + 4, because if you have a full scorecard you have to keep looping to get the 4 extras players
     for ($i = 1; $i <= $match->GetMaximumPlayersPerTeam() + 4; $i++) {
         $batting = $batting_data->MoveNext() ? $batting_data->GetItem() : null;
         /* @var $batting Batting */
         # Grab the scores for extras players to use later
         if (!is_null($batting)) {
             switch ($batting->GetPlayer()->GetPlayerRole()) {
                 case Player::BYES:
                     $byes = $batting->GetRuns();
                     break;
                 case Player::WIDES:
                     $wides = $batting->GetRuns();
                     break;
                 case Player::NO_BALLS:
                     $no_balls = $batting->GetRuns();
                     break;
                 case Player::BONUS_RUNS:
                     $bonus = $batting->GetRuns();
                     break;
             }
         }
         # Don't write a table row for the last four loops, we'll do that next because they're different
         if ($i <= $match->GetMaximumPlayersPerTeam()) {
             $player = new TextBox("batName{$i}", (is_null($batting) or !$batting->GetPlayer()->GetPlayerRole() == Player::PLAYER) ? "" : $batting->GetPlayer()->GetName(), $this->IsValidSubmit());
             $player->SetMaxLength(100);
             $player->AddAttribute("autocomplete", "off");
             $player->AddCssClass("player batsman team" . $batting_team->GetId());
             $how = new XhtmlSelect("batHowOut{$i}", null, $this->IsValidSubmit());
             $how->SetCssClass("howOut");
             $how->AddOptions(array(Batting::DID_NOT_BAT => Batting::Text(Batting::DID_NOT_BAT), Batting::NOT_OUT => Batting::Text(Batting::NOT_OUT), Batting::CAUGHT => Batting::Text(Batting::CAUGHT), Batting::BOWLED => Batting::Text(Batting::BOWLED), Batting::CAUGHT_AND_BOWLED => str_replace(" and ", "/", Batting::Text(Batting::CAUGHT_AND_BOWLED)), Batting::RUN_OUT => Batting::Text(Batting::RUN_OUT), Batting::BODY_BEFORE_WICKET => "bbw", Batting::HIT_BALL_TWICE => Batting::Text(Batting::HIT_BALL_TWICE), Batting::TIMED_OUT => Batting::Text(Batting::TIMED_OUT), Batting::RETIRED_HURT => Batting::Text(Batting::RETIRED_HURT), Batting::RETIRED => Batting::Text(Batting::RETIRED), Batting::UNKNOWN_DISMISSAL => Batting::Text(Batting::UNKNOWN_DISMISSAL)), null);
             if (!is_null($batting) and $batting->GetPlayer()->GetPlayerRole() == Player::PLAYER and $this->IsValidSubmit()) {
                 $how->SelectOption($batting->GetHowOut());
             }
             $out_by = new TextBox("batOutBy{$i}", (is_null($batting) or is_null($batting->GetDismissedBy()) or !$batting->GetDismissedBy()->GetPlayerRole() == Player::PLAYER) ? "" : $batting->GetDismissedBy()->GetName(), $this->IsValidSubmit());
             $out_by->SetMaxLength(100);
             $out_by->AddAttribute("autocomplete", "off");
             $out_by->AddCssClass("player team" . $bowling_team->GetId());
             $bowled_by = new TextBox("batBowledBy{$i}", (is_null($batting) or is_null($batting->GetBowler()) or !$batting->GetBowler()->GetPlayerRole() == Player::PLAYER) ? "" : $batting->GetBowler()->GetName(), $this->IsValidSubmit());
             $bowled_by->SetMaxLength(100);
             $bowled_by->AddAttribute("autocomplete", "off");
             $bowled_by->AddCssClass("player team" . $bowling_team->GetId());
             $runs = new TextBox("batRuns{$i}", (is_null($batting) or $batting->GetPlayer()->GetPlayerRole() != Player::PLAYER) ? "" : $batting->GetRuns(), $this->IsValidSubmit());
             $runs->SetCssClass("numeric runs");
             $runs->AddAttribute("type", "number");
             $runs->AddAttribute("min", "0");
             $runs->AddAttribute("autocomplete", "off");
             $balls = new TextBox("batBalls{$i}", (is_null($batting) or $batting->GetPlayer()->GetPlayerRole() != Player::PLAYER) ? "" : $batting->GetBallsFaced(), $this->IsValidSubmit());
             $balls->SetCssClass("numeric balls");
             $balls->AddAttribute("type", "number");
             $balls->AddAttribute("min", "0");
             $balls->AddAttribute("autocomplete", "off");
             $batting_row = new XhtmlRow(array($player, $how, $out_by, $bowled_by, $runs, $balls));
             $batting_row->GetFirstCell()->SetCssClass("batsman");
             $batting_table->AddRow($batting_row);
         }
     }
     $batting_table->AddRow($this->CreateExtrasRow("batByes", "Byes", "extras", "numeric runs", $byes));
     $batting_table->AddRow($this->CreateExtrasRow("batWides", "Wides", "extras", "numeric runs", $wides));
     $batting_table->AddRow($this->CreateExtrasRow("batNoBalls", "No balls", "extras", "numeric runs", $no_balls));
     $batting_table->AddRow($this->CreateExtrasRow("batBonus", "Bonus or penalty runs", "extras", "numeric runs", $bonus));
     $batting_table->AddRow($this->CreateExtrasRow("batTotal", "Total", "totals", "numeric", $total));
     $batting_table->AddRow($this->CreateWicketsRow($match, $wickets_taken));
     $this->AddControl($batting_table);
     $total_batsmen = new TextBox("batRows", $match->GetMaximumPlayersPerTeam(), $this->IsValidSubmit());
     $total_batsmen->SetMode(TextBoxMode::Hidden());
     $this->AddControl($total_batsmen);
     $bowling_table = new XhtmlTable();
//.........这里部分代码省略.........
开发者ID:stoolball-england,项目名称:stoolball-england-website,代码行数:101,代码来源:scorecard-edit-control.class.php


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