<?php
/**
* @author    JoomShaper http://www.joomshaper.com
* @copyright Copyright (C) 2010 - 2013 JoomShaper
* @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

// Required soccer tournament helper
JLoader::register('SpsoccerModelTournaments', JPATH_ROOT . '/components/com_spsoccer/models/tournaments.php');

// Required module helpers
JLoader::register('SpsoccerHelper', JPATH_ROOT . '/components/com_spsoccer/helpers/helper.php');
JLoader::register('ModSpClubRankingsHelper', __DIR__ . '/helper.php');

// load css
$doc = JFactory::getDocument();
// load fonts from components
$doc->addStylesheet( JURI::base(true) . '/components/com_spsoccer/assets/css/soccer-font.css' );
// Load style
$doc->addStylesheet( JURI::base(true) . '/modules/mod_sp_club_rankings/assets/css/rank-style.css' );
$doc->addScript( JURI::base(true) . '/modules/mod_sp_club_rankings/assets/js/club-rank.js' );

// Get Module class sfx
$moduleclass_sfx = $params->get('moduleclass_sfx');

// Get item limit
$limit           = $params->get('limit', 6);
// Get row limit
$row             = $params->get('row', 3);

// Get Items
$teams = ModSpClubRankingsHelper::getTournamentGroups($params);


require( JModuleHelper::getLayoutPath('mod_sp_club_rankings') );
