| Current Path : /home/lejardintz/www/components/com_kunena/controller/application/topic/flat/ |
| Current File : /home/lejardintz/www/components/com_kunena/controller/application/topic/flat/display.php |
<?php
/**
* Kunena Component
* @package Kunena.Site
* @subpackage Controller.Application
*
* @copyright (C) 2008 - 2016 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link https://www.kunena.org
**/
defined('_JEXEC') or die;
/**
* Class ComponentKunenaControllerApplicationTopicFlatDisplay
*
* @since K4.0
*/
class ComponentKunenaControllerApplicationTopicFlatDisplay extends KunenaControllerApplicationDisplay
{
/**
* Return true if layout exists.
*
* @return bool
*/
public function exists()
{
$this->page = KunenaLayoutPage::factory("{$this->input->getCmd('view')}/default");
return (bool) $this->page->getPath();
}
/**
* Change topic layout to flat.
*
* @return void
*/
protected function before()
{
$layout = $this->input->getWord('layout');
KunenaUserHelper::getMyself()->setTopicLayout($layout);
parent::before();
}
}