gyro/modules/staticmainpage/controller/index.base.controller.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * @defgroup StaticMainPage 00004 * @ingroup Modules 00005 * 00006 * Routes view/templates/[lang]/index.tpl.php to the main page 00007 */ 00008 00009 /** 00010 * Controller for front page 00011 * 00012 * Routes view/templates/[lang]/index.tpl.php to the main page 00013 * 00014 * @author Gerd Riesselmann 00015 * @ingroup StaticMainPage 00016 */ 00017 class IndexBaseController extends ControllerBase { 00018 /** 00019 * Return array of urls which are handled by this controller 00020 */ 00021 public function get_routes() { 00022 return array( 00023 new ExactMatchRoute('.', $this, 'index') 00024 ); 00025 } 00026 00027 /** 00028 * Show front page 00029 * 00030 * @param Pagedata $page_data 00031 */ 00032 public function action_index($page_data) { 00033 $page_data->head->title = Config::get_value(Config::TITLE); 00034 $view = ViewFactory::create_view(IViewFactory::CONTENT, 'index', $page_data); 00035 $view->render(); 00036 } 00037 }