public function getTemplateParameters() { $markers = array(); $teams = array(); // get data for current standing if ($this->_seasonId == null && $this->_type == null) { $teams = TeamsDataService::getTeamsOfLeagueOrderedByTableCriteria($this->_websoccer, $this->_db, $this->_leagueId); // get table markers $fromTable = $this->_websoccer->getConfig("db_prefix") . "_tabelle_markierung"; $columns["bezeichnung"] = "name"; $columns["farbe"] = "color"; $columns["platz_von"] = "place_from"; $columns["platz_bis"] = "place_to"; $whereCondition = "liga_id = %d ORDER BY place_from ASC"; $result = $this->_db->querySelect($columns, $fromTable, $whereCondition, $this->_leagueId); while ($marker = $result->fetch_array()) { $markers[] = $marker; } $result->free(); // get data of specified season or home-/away table } else { $seasonId = 0; // no season selected, so select current one if ($this->_seasonId == null) { $result = $this->_db->querySelect("id", $this->_websoccer->getConfig("db_prefix") . "_saison", "liga_id = %d AND beendet = '0' ORDER BY name DESC", $this->_leagueId, 1); $season = $result->fetch_array(); $result->free(); if ($season["id"]) { $seasonId = $season["id"]; } } else { $seasonId = $this->_seasonId; } if ($seasonId) { $teams = TeamsDataService::getTeamsOfSeasonOrderedByTableCriteria($this->_websoccer, $this->_db, $seasonId, $this->_type); } } // get completed seasons $seasons = array(); $result = $this->_db->querySelect("id,name", $this->_websoccer->getConfig("db_prefix") . "_saison", "liga_id = %d AND beendet = '1' ORDER BY name DESC", $this->_leagueId); while ($season = $result->fetch_array()) { $seasons[] = $season; } $result->free(); return array("leagueId" => $this->_leagueId, "teams" => $teams, "markers" => $markers, "seasons" => $seasons); }