PageRenderTime 27ms CodeModel.GetById 16ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/com_joomleague/components/com_joomleague/controllers/playground.php

https://gitlab.com/volleyuisp/joomleague
PHP | 64 lines | 39 code | 9 blank | 16 comment | 4 complexity | d5c199c898462178ff51b40b26126780 MD5 | raw file
 1<?php
 2/**
 3 * @copyright	Copyright (C) 2006-2014 joomleague.at. All rights reserved.
 4 * @license		GNU/GPL,see LICENSE.php
 5 * Joomla! is free software. This version may have been modified pursuant
 6 * to the GNU General Public License,and as distributed it includes or
 7 * is derivative of works licensed under the GNU General Public License or
 8 * other free or open source software licenses.
 9 * See COPYRIGHT.php for copyright notices and details.
10 */
11
12// Check to ensure this file is included in Joomla!
13defined('_JEXEC') or die('Restricted access');
14
15jimport('joomla.application.component.controller');
16
17class JoomleagueControllerPlayground extends JoomleagueController
18{
19    public function display($cachable = false, $urlparams = false) 
20    {
21        // Get the view name from the query string
22        $viewName = JRequest::getVar( "view", "playground" );
23
24        // Get the view
25        $view = $this->getView( $viewName );
26
27        // Get the joomleague model
28        $jl = $this->getModel( "joomleague", "JoomleagueModel" );
29        $jl->set( "_name", "joomleague" );
30        if (!JError::isError( $jl ) )
31        {
32            $view->setModel ( $jl );
33        }
34
35        // Get the playground model
36        $pg = $this->getModel( "playground", "JoomleagueModel" );
37        $pg->set( "_name", "playground" );
38        if (!JError::isError( $pg ) )
39        {
40            $view->setModel ( $pg );
41        }
42
43        // Get the countries model
44        $cn = $this->getModel( "countries", "JoomleagueModel" );
45        $cn->set( "_name", "countries" );
46        if (!JError::isError( $cn ) )
47        {
48            $view->setModel ( $cn );
49        }
50
51        // Get the Google map model
52        $gm = $this->getModel( "googlemap", "JoomleagueModel" );
53        $gm->set( "_name", "googlemap" );
54        if (!JError::isError( $gm ) )
55        {
56            $view->setModel ( $gm );
57        }
58
59        $this->showprojectheading();
60        $view->display();
61        $this->showbackbutton();
62        $this->showfooter();
63    }
64}