-
Notifications
You must be signed in to change notification settings - Fork 1
/
controller.php
47 lines (41 loc) · 1008 Bytes
/
controller.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* @package JUHome Component
* @version 3.x
* @author Denys D. Nosov ([email protected])
* @copyright (C) 2011-2020 by Denys D. Nosov (https://joomla-ua.org)
* @license GNU General Public License version 2 or later
*
* @since 3.0
*/
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
defined('_JEXEC') or die;
/**
* Content Component Controller
*
* @since 3.0
*/
class HomeController extends BaseController
{
/**
* @param bool $cachable
* @param bool $urlparams
*
* @return JControllerLegacy This object to support chaining.
*
* @throws \Exception
* @since 3.0
*/
public function display($cachable = false, $urlparams = false)
{
$params = Factory::getApplication()->getParams();
if($params->get('cache_home', '0') == 1)
{
$cachable = true;
}
$vName = $this->input->get('view', 'home');
$this->input->set('view', $vName);
return parent::display($cachable, [ 'Itemid' => 'INT' ]);
}
}