<?php

/**
 * @package     SP Soccer
 * @author      JoomShaper http://www.joomshaper.com
 * @copyright   Copyright (C) 2010 - 2016 JoomShaper. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die('Restricted access');

class SpsoccerViewGameteams extends FOFViewForm{

	public function display($tpl = null){
		// Get model
		$model = $this->getModel();
		$this->items = $model->getItemList();

		foreach ($this->items as &$this->item) {
			// URL Generate
			$this->item->url = JRoute::_('index.php?option=com_spsoccer&view=gameteam&id=' . $this->item->spsoccer_gameteam_id . ':' . $this->item->slug . SpsoccerHelper::getItemid('gameteams'));

			$this->item->logo = SpsoccerHelper::hasImg($this->item->logo);
		}


		return parent::display($tpl = null);
	}

}
