/** * (non-PHPdoc) * @see IModel::getTemplateParameters() */ public function getTemplateParameters() { $userId = (int) $this->_websoccer->getRequestParameter('id'); $matches = MatchesDataService::getLatestMatchesByUser($this->_websoccer, $this->_db, $userId); $items = array(); foreach ($matches as $match) { $items[] = array('url' => $this->_websoccer->getInternalUrl('match', 'id=' . $match['id'], TRUE), 'title' => $match['home_team'] . ' - ' . $match['guest_team'] . ' (' . $match['home_goals'] . ':' . $match['guest_goals'] . ')', 'date' => gmdate(DATE_RSS, $match['date'])); } return array('items' => $items); }
public function getTemplateParameters() { $matches = MatchesDataService::getLatestMatchesByUser($this->_websoccer, $this->_db, $this->_userId); return array("matches" => $matches); }