/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. // Check to ensure this file is included in Joomla!
  12. defined('_JEXEC') or die('Restricted access');
  13. jimport('joomla.application.component.controller');
  14. class JoomleagueControllerPlayground extends JoomleagueController
  15. {
  16. public function display($cachable = false, $urlparams = false)
  17. {
  18. // Get the view name from the query string
  19. $viewName = JRequest::getVar( "view", "playground" );
  20. // Get the view
  21. $view = $this->getView( $viewName );
  22. // Get the joomleague model
  23. $jl = $this->getModel( "joomleague", "JoomleagueModel" );
  24. $jl->set( "_name", "joomleague" );
  25. if (!JError::isError( $jl ) )
  26. {
  27. $view->setModel ( $jl );
  28. }
  29. // Get the playground model
  30. $pg = $this->getModel( "playground", "JoomleagueModel" );
  31. $pg->set( "_name", "playground" );
  32. if (!JError::isError( $pg ) )
  33. {
  34. $view->setModel ( $pg );
  35. }
  36. // Get the countries model
  37. $cn = $this->getModel( "countries", "JoomleagueModel" );
  38. $cn->set( "_name", "countries" );
  39. if (!JError::isError( $cn ) )
  40. {
  41. $view->setModel ( $cn );
  42. }
  43. // Get the Google map model
  44. $gm = $this->getModel( "googlemap", "JoomleagueModel" );
  45. $gm->set( "_name", "googlemap" );
  46. if (!JError::isError( $gm ) )
  47. {
  48. $view->setModel ( $gm );
  49. }
  50. $this->showprojectheading();
  51. $view->display();
  52. $this->showbackbutton();
  53. $this->showfooter();
  54. }
  55. }