public function getTemplateParameters() { $playersCount = PlayersDataService::findPlayersCount($this->_websoccer, $this->_db, $this->_firstName, $this->_lastName, $this->_club, $this->_position, $this->_strength, $this->_lendableOnly); // setup paginator $eps = $this->_websoccer->getConfig("entries_per_page"); $paginator = new Paginator($playersCount, $eps, $this->_websoccer); $paginator->addParameter("block", "playerssearch-results"); $paginator->addParameter("fname", $this->_firstName); $paginator->addParameter("lname", $this->_lastName); $paginator->addParameter("club", $this->_club); $paginator->addParameter("position", $this->_position); $paginator->addParameter("strength", $this->_strength); $paginator->addParameter("lendable", $this->_lendableOnly); // get players records if ($playersCount > 0) { $players = PlayersDataService::findPlayers($this->_websoccer, $this->_db, $this->_firstName, $this->_lastName, $this->_club, $this->_position, $this->_strength, $this->_lendableOnly, $paginator->getFirstIndex(), $eps); } else { $players = array(); } return array("playersCount" => $playersCount, "players" => $players, "paginator" => $paginator); }