本文整理汇总了PHP中FormBuilder::createFormGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP FormBuilder::createFormGroup方法的具体用法?PHP FormBuilder::createFormGroup怎么用?PHP FormBuilder::createFormGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::createFormGroup方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<legend><?php
echo $i18n->getMessage("schedulegenerator_label");
?>
</legend>
<?php
$formFields = array();
$seasonDefaultName = date("Y");
$formFields["league"] = array("type" => "foreign_key", "labelcolumns" => "land,name", "jointable" => "liga", "entity" => "league", "value" => "", "required" => "true");
$formFields["seasonname"] = array("type" => "text", "value" => $seasonDefaultName, "required" => "true");
$formFields["rounds"] = array("type" => "number", "value" => 2, "required" => "true");
$formFields["firstmatchday"] = array("type" => "timestamp", "value" => "");
$formFields["timebreak"] = array("type" => "number", "value" => 5);
$formFields["timebreak_rounds"] = array("type" => "number", "value" => 0);
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "schedulegenerator_label_");
}
?>
</fieldset>
<div class="form-actions">
<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php
echo $i18n->getMessage("generator_button");
?>
">
<input type="reset" class="btn" value="<?php
echo $i18n->getMessage("button_reset");
?>
">
</div>
</form>
示例2: foreach
?>
">
<input type="hidden" name="round" value="<?php
echo $roundid;
?>
">
<fieldset>
<legend><?php
echo $i18n->getMessage("managecuprounds_groups_label_create");
?>
</legend>
<?php
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "managecuprounds_group_label_");
}
?>
<div>
<label><?php
echo $i18n->getMessage("managecuprounds_groups_label_selectteams");
?>
</label>
</div>
<div style="width: 600px; height: 300px; overflow: auto; border: 1px solid #cccccc;">
<table class="table table-striped table-hover">
<colgroup>
<col style="width: 30px">
<col>
<col>
示例3: escapeOutput
echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\">";
echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\">";
echo "<fieldset><legend>" . $i18n->getMessage("match_manage_createmessage_title") . "</legend>";
echo "<div class=\"control-group\">";
echo "<label class=\"control-label\" for=\"team_id\">" . $i18n->getMessage("entity_player_verein_id") . "</label>";
echo "<div class=\"controls\">";
echo "<select name=\"team_id\" id=\"team_id\">";
echo "<option value=\"" . $match["match_home_id"] . "\">" . escapeOutput($match["match_home_name"]) . "</option>";
echo "<option value=\"" . $match["match_guest_id"] . "\">" . escapeOutput($match["match_guest_name"]) . "</option>";
echo "</select>";
echo "</div>";
echo "</div>";
echo FormBuilder::createFormGroup($i18n, "message_id", array("type" => "foreign_key", "jointable" => "spiel_text", "entity" => "matchtext", "labelcolumns" => "aktion,nachricht"), "", "match_manage_reportmsg_");
echo FormBuilder::createFormGroup($i18n, "playernames", array("type" => "text"), "", "match_manage_reportmsg_");
echo FormBuilder::createFormGroup($i18n, "minute", array("type" => "number"), "", "match_manage_reportmsg_");
echo FormBuilder::createFormGroup($i18n, "intermediateresult", array("type" => "text"), "", "match_manage_reportmsg_");
echo "</fieldset>";
echo "<div class=\"form-actions\">";
echo "<button type=\"submit\" class=\"btn btn-primary\">" . $i18n->getMessage("button_save") . "</button>";
echo "</div></form>";
// ******** list items
$reportItems = MatchesDataService::getMatchReportMessages($website, $db, $i18n, $matchId);
// no items
if (!count($reportItems)) {
echo createInfoMessage("", $i18n->getMessage("match_manage_reportitems_noitems"));
// list items
} else {
echo "<table class=\"table table-bordered table-striped table-hover\">";
echo "<thead>";
echo "<tr>";
echo "<th>" . $i18n->getMessage("match_manage_reportmsg_minute") . "</th>";
示例4: escapeOutput
<input type="hidden" name="lang" value="<?php
echo escapeOutput($selectedLang);
?>
">
<input type="hidden" name="site" value="<?php
echo $site;
?>
">
<fieldset>
<?php
$formFields = array();
$terms = (string) $termsConfig[0];
$formFields["content"] = array("type" => "html", "value" => $terms, "required" => "true");
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "imprint_label_");
}
?>
</fieldset>
<div class="form-actions">
<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php
echo $i18n->getMessage("button_save");
?>
">
<input type="reset" class="btn" value="<?php
echo $i18n->getMessage("button_reset");
?>
">
</div>
</form>
示例5: escapeOutput
echo escapeOutput($_REQUEST["page"]);
?>
">
<?php
}
?>
<fieldset>
<legend><?php
echo $i18n->getMessage("manage_edit_title");
?>
</legend>
<?php
foreach ($formFields as $fieldId => $fieldInfo) {
$fieldValue = $action == "save" && isset($_POST[$fieldId]) ? $_POST[$fieldId] : $row[$fieldId];
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldValue, $labelPrefix);
}
?>
</fieldset>
<div class="form-actions">
<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php
echo $i18n->getMessage("button_save");
?>
">
<a class="btn" href="?site=<?php
echo $site;
?>
&entity=<?php
echo $entity;
?>
"><?php
示例6: array
$formFields['option_RM'] = array('type' => 'number', 'value' => 1);
$formFields['option_LS'] = array('type' => 'number', 'value' => 1);
$formFields['option_MS'] = array('type' => 'number', 'value' => 1);
$formFields['option_RS'] = array('type' => 'number', 'value' => 1);
$formFields['player_age'] = array('type' => 'number', 'value' => 25);
$formFields['player_age_deviation'] = array('type' => 'number', 'value' => 3);
$formFields['entity_player_vertrag_gehalt'] = array('type' => 'number', 'value' => 10000);
$formFields['entity_player_vertrag_spiele'] = array('type' => 'number', 'value' => 60);
$formFields['entity_player_w_staerke'] = array('type' => 'percent', 'value' => 50);
$formFields['entity_player_w_technik'] = array('type' => 'percent', 'value' => 50);
$formFields['entity_player_w_kondition'] = array('type' => 'percent', 'value' => 70);
$formFields['entity_player_w_frische'] = array('type' => 'percent', 'value' => 80);
$formFields['entity_player_w_zufriedenheit'] = array('type' => 'percent', 'value' => 80);
$formFields['playersgenerator_label_deviation'] = array('type' => 'percent', 'value' => 10);
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo['value'], '');
}
?>
</fieldset>
<div class='form-actions'>
<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php
echo $i18n->getMessage('firemanagers_dismiss_button');
?>
'>
<a class='btn' href='?site=<?php
echo $site;
?>
'><?php
echo $i18n->getMessage('button_cancel');
?>
</a>
示例7: escapeOutput
<fieldset>
<legend><?php
echo escapeOutput($season['name']);
?>
</legend>
<?php
$formFields = array();
$formFields['playerdisableage'] = array('type' => 'number', 'value' => 35, 'required' => 'false');
$formFields['target_missed_firemanager'] = array('type' => 'boolean', 'value' => 0, 'required' => 'false');
$formFields['target_missed_popularityreduction'] = array('type' => 'percent', 'value' => 20, 'required' => 'false');
$formFields['target_missed_penalty'] = array('type' => 'number', 'value' => 0, 'required' => 'false');
$formFields['target_accomplished_reward'] = array('type' => 'number', 'value' => 0, 'required' => 'false');
$formFields['youthplayers_age_delete'] = array('type' => 'number', 'value' => 19, 'required' => 'false');
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo['value'], 'season_complete_label_');
}
?>
</fieldset>
<div class='form-actions'>
<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php
echo $i18n->getMessage('season_complete_submit');
?>
'>
<input type='reset' class='btn' value='<?php
echo $i18n->getMessage('button_reset');
?>
'>
</div>
</form>
<?php
示例8: foreach
echo $_SERVER['PHP_SELF'];
?>
" method="get">
<input type="hidden" name="site" value="<?php
echo $site;
?>
">
<input type="hidden" name="entity" value="<?php
echo $entity;
?>
">
<?php
foreach ($filterFields as $filterFieldId => $filterFieldInfo) {
if ($filterFieldInfo["type"] !== "timestamp" && $filterFieldInfo["type"] !== "date") {
echo FormBuilder::createFormGroup($i18n, $filterFieldId, $filterFieldInfo, $filterFieldInfo["value"], "");
}
}
?>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-primary"><?php
echo $i18n->getMessage("button_search");
?>
</button>
<a href="?site=<?php
echo $site;
?>
&entity=<?php
echo $entity;
示例9: foreach
?>
</ul>
<div class='tab-content'>
<?php
// tab content
$firstTab = TRUE;
foreach ($tabs as $tabId => $settings) {
echo '<div class=\'tab-pane';
if ($firstTab) {
echo ' active';
}
echo '\' id=\'' . $tabId . '\'>';
foreach ($settings as $settingId => $settingInfo) {
echo FormBuilder::createFormGroup($i18n, $settingId, $settingInfo, $website->getConfig($settingId), 'settings_label_');
}
echo '</div>';
$firstTab = FALSE;
}
?>
</div>
<div class='form-actions'>
<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php
echo $i18n->getMessage('button_save');
?>
'>
<input type='reset' class='btn' value='<?php
示例10: escapeOutput
">
<fieldset>
<legend><?php
echo escapeOutput($admin['name']);
?>
</legend>
<?php
$formFields = array();
$formFields["email"] = array("type" => "email", "value" => $admin['email'], "required" => "true");
$formFields["newpassword"] = array("type" => "password", "value" => "");
$formFields["repeatpassword"] = array("type" => "password", "value" => "");
$formFields["language"] = array("type" => "select", "value" => $admin["lang"], "selection" => $website->getConfig("supported_languages"));
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "profile_label_");
}
?>
</fieldset>
<div class="form-actions">
<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php
echo $i18n->getMessage("button_save");
?>
">
<input type="reset" class="btn" value="<?php
echo $i18n->getMessage("button_reset");
?>
">
</div>
</form>
示例11: array
<input type='hidden' name='show' value='save'>
<input type='hidden' name='site' value='<?php
echo $site;
?>
'>
<fieldset>
<?php
$formFields = array();
$filecontent = '';
if (file_exists(IMPRINT_FILE)) {
$filecontent = file_get_contents(IMPRINT_FILE);
}
$formFields['content'] = array('type' => 'html', 'value' => $filecontent, 'required' => 'true');
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo['value'], 'imprint_label_');
}
?>
</fieldset>
<div class='form-actions'>
<input type='submit' class='btn btn-primary' accesskey='s' title='Alt + s' value='<?php
echo $i18n->getMessage('button_save');
?>
'>
<input type='reset' class='btn' value='<?php
echo $i18n->getMessage('button_reset');
?>
'>
</div>
</form>
示例12: foreach
echo "</fieldset>";
echo "<div class=\"form-actions\">";
echo "<button type=\"submit\" class=\"btn btn-primary\">" . $i18n->getMessage("button_save") . "</button>";
echo "</div></form>";
// ******** list players and enable editing
echo "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\">";
echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\"/>";
echo "<input type=\"hidden\" name=\"action\" value=\"update\"/>";
echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\"/>";
foreach ($teamPrefixes as $teamPrefix) {
echo "<h2><a href=\"" . $website->getInternalUrl("team", "id=" . $match["match_" . $teamPrefix . "_id"]) . "\" target=\"_blank\">" . escapeOutput($match["match_" . $teamPrefix . "_name"]) . "</a></h2>";
// tactic
echo "<div class=\"form-horizontal\">";
echo FormBuilder::createFormGroup($i18n, $teamPrefix . "_offensive", array("type" => "number", "value" => $match["match_" . $teamPrefix . "_offensive"]), $match["match_" . $teamPrefix . "_offensive"], "formation_");
echo FormBuilder::createFormGroup($i18n, $teamPrefix . "_longpasses", array("type" => "boolean", "value" => $match["match_" . $teamPrefix . "_longpasses"]), $match["match_" . $teamPrefix . "_longpasses"], "formation_");
echo FormBuilder::createFormGroup($i18n, $teamPrefix . "_counterattacks", array("type" => "boolean", "value" => $match["match_" . $teamPrefix . "_counterattacks"]), $match["match_" . $teamPrefix . "_counterattacks"], "formation_");
echo "</div>";
// get existing players
$playerTable = $website->getConfig("db_prefix") . "_spiel_berechnung SB";
$playerTable .= " INNER JOIN " . $website->getConfig("db_prefix") . "_spieler S ON S.id = SB.spieler_id";
$result = $db->querySelect("SB.*", $playerTable, "spiel_id = %d AND team_id = %d ORDER BY feld ASC, field(SB.position_main, 'T', 'LV', 'IV', 'RV', 'DM', 'LM', 'ZM', 'RM', 'OM', 'LS', 'MS', 'RS')", array($matchId, $match["match_" . $teamPrefix . "_id"]));
$playersCount = $result->num_rows;
// no player records
if (!$playersCount) {
echo createInfoMessage("", $i18n->getMessage("match_manage_playerstatistics_noitems"));
// check if any formation is available
$fresult = $db->querySelect("COUNT(*) AS hits", $website->getConfig("db_prefix") . "_aufstellung", "verein_id = %d", $match["match_" . $teamPrefix . "_id"]);
$formationCount = $fresult->fetch_array();
$fresult->free();
if ($formationCount && $formationCount["hits"]) {
echo "<p><a href=\"?site={$site}&match={$matchId}&team={$teamPrefix}&action=generate\" class=\"btn\"><i class=\"icon-hand-right\"></i> " . $i18n->getMessage("match_manage_playerstatistics_createfromfrmation") . "</a></p>";
示例13: renderRound
function renderRound($roundNode)
{
global $i18n;
global $website;
global $hierarchy;
global $site;
global $cupid;
global $cup;
global $action;
global $db;
echo "<div class=\"cupround\">";
$showEditForm = FALSE;
if ($action == "edit" && $_REQUEST["id"] == $roundNode["round"]["id"]) {
$showEditForm = TRUE;
// save changes of edit
} elseif ($action == "edit-save" && $_REQUEST["id"] == $roundNode["round"]["id"]) {
if (isset($admin["r_demo"]) && $admin["r_demo"]) {
throw new Exception($i18n->getMessage("validationerror_no_changes_as_demo"));
}
$showEditForm = TRUE;
$columns = array();
$columns["name"] = $_POST["name"];
$columns["finalround"] = isset($_POST["finalround"]) && $_POST["finalround"] == "1" ? 1 : 0;
$columns["groupmatches"] = isset($_POST["groupmatches"]) && $_POST["groupmatches"] == "1" ? 1 : 0;
$firstDateObj = DateTime::createFromFormat($website->getConfig("date_format") . ", H:i", $_POST["firstround_date_date"] . ", " . $_POST["firstround_date_time"]);
$columns["firstround_date"] = $firstDateObj->getTimestamp();
if (isset($_POST["secondround_date_date"])) {
$secondDateObj = DateTime::createFromFormat($website->getConfig("date_format") . ", H:i", $_POST["secondround_date_date"] . ", " . $_POST["secondround_date_time"]);
$columns["secondround_date"] = $secondDateObj->getTimestamp();
}
$db->queryUpdate($columns, $website->getConfig("db_prefix") . "_cup_round", "id = %d", $roundNode["round"]["id"]);
// name has changed, so also update already existing matches
if ($roundNode["round"]["name"] !== $_POST["name"]) {
$db->queryUpdate(array("pokalrunde" => $_POST["name"]), $website->getConfig("db_prefix") . "_spiel", "pokalname = '%s' AND pokalrunde = '%s'", array($cup["name"], $roundNode["round"]["name"]));
}
// update local instance
$result = $db->querySelect("*", $website->getConfig("db_prefix") . "_cup_round", "id = %d", $roundNode["round"]["id"]);
$roundNode["round"] = $result->fetch_array();
$result->free();
$showEditForm = FALSE;
}
// display edit form
if ($showEditForm) {
?>
<form action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="post" class="form-horizontal">
<input type="hidden" name="action" value="edit-save">
<input type="hidden" name="site" value="<?php
echo $site;
?>
">
<input type="hidden" name="cup" value="<?php
echo $cupid;
?>
">
<input type="hidden" name="id" value="<?php
echo $roundNode["round"]["id"];
?>
">
<?php
$formFields = array();
$formFields["name"] = array("type" => "text", "value" => $roundNode["round"]["name"], "required" => "true");
$formFields["firstround_date"] = array("type" => "timestamp", "value" => $roundNode["round"]["firstround_date"], "required" => "true");
if ($roundNode["round"]["secondround_date"]) {
$formFields["secondround_date"] = array("type" => "timestamp", "value" => $roundNode["round"]["secondround_date"], "required" => "false");
}
$formFields["finalround"] = array("type" => "boolean", "value" => $roundNode["round"]["finalround"]);
$formFields["groupmatches"] = array("type" => "boolean", "value" => $roundNode["round"]["groupmatches"]);
foreach ($formFields as $fieldId => $fieldInfo) {
echo FormBuilder::createFormGroup($i18n, $fieldId, $fieldInfo, $fieldInfo["value"], "managecuprounds_label_");
}
?>
<div class="control-group">
<div class="controls">
<input type="submit" class="btn btn-primary" accesskey="s" title="Alt + s" value="<?php
echo $i18n->getMessage("button_save");
?>
">
<a href="<?php
echo "?site=" . $site . "&cup=" . $cupid;
?>
" class="btn"><?php
echo $i18n->getMessage("button_cancel");
?>
</a>
</div>
</div>
</form>
<?php
// display details
} else {
echo "<p><strong>";
if ($roundNode["round"]["finalround"] == "1") {
echo "<em>";
}
//.........这里部分代码省略.........
示例14: DefaultSimulationStrategy
$columns["M.gast_w" . $subNo . "_condition"] = "guest_sub_" . $subNo . "_condition";
}
$result = $db->querySelect($columns, $fromTable, "M.id = %d", $matchId);
$matchinfo = $result->fetch_array();
$result->free();
// init default simulation strategry in order to include dependend constants. Yeah, refactor this once having to much time...
$dummyVar = new DefaultSimulationStrategy($website);
$matchModel = SimulationStateHelper::loadMatchState($website, $db, $matchinfo);
// compute audience
if ($website->getRequestParameter("computetickets")) {
SimulationAudienceCalculator::computeAndSaveAudience($website, $db, $matchModel);
}
if ($matchinfo["type"] == "Pokalspiel") {
SimulationCupMatchHelper::checkIfExtensionIsRequired($website, $db, $matchModel);
}
// complete match
$observer = new DataUpdateSimulatorObserver($website, $db);
$observer->onMatchCompleted($matchModel);
// show success message
echo createSuccessMessage($i18n->getMessage("match_manage_complete_success"), "");
}
echo "<h3><a href=\"" . $website->getInternalUrl("team", "id=" . $match["match_home_id"]) . "\" target=\"_blank\">" . escapeOutput($match["match_home_name"]) . "</a> - <a href=\"" . $website->getInternalUrl("team", "id=" . $match["match_guest_id"]) . "\" target=\"_blank\">" . escapeOutput($match["match_guest_name"]) . "</a></h3>";
echo "<div class=\"well\">" . $i18n->getMessage("match_manage_complete_intro") . "</div>";
echo "<form action=\"" . $_SERVER['PHP_SELF'] . "\" method=\"post\" class=\"form-horizontal\">";
echo "<input type=\"hidden\" name=\"site\" value=\"{$site}\"/>";
echo "<input type=\"hidden\" name=\"action\" value=\"complete\"/>";
echo "<input type=\"hidden\" name=\"match\" value=\"{$matchId}\"/>";
echo FormBuilder::createFormGroup($i18n, "computetickets", array("type" => "boolean", "value" => "1"), "1", "match_manage_complete_");
echo "<div class=\"form-actions\">";
echo "<button type=\"submit\" class=\"btn btn-primary\">" . $i18n->getMessage("match_manage_complete_button") . "</button>";
echo "</div></form>";