/
githubmirror
/
joomla-cms
Обзор
Документация
Войти
/
githubmirror
/
joomla-cms
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
5.4-dev
components/com_finder/src/Controller/DisplayController.php
62 строки
2 KB
Brian Teeman
[5.0] link docblock (#41178)
09 авг 2023, 23:34
Не верифицирован
09 авг 2023, 23:34
7ec953a
Код
Авторство
О чём код?
<?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Finder\Site\Controller; use Joomla\CMS\MVC\Controller\BaseController; use Joomla\Component\Finder\Administrator\Helper\LanguageHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Finder Component Controller. * * @since 2.5 */ class DisplayController extends BaseController { /** * Method to display a view. * * @param boolean $cachable If true, the view output will be cached. [optional] * @param array $urlparams An array of safe URL parameters and their variable types. Optional. * @see \Joomla\CMS\Filter\InputFilter::clean() for valid values. * * @return static This object is to support chaining. * * @since 2.5 */ public function display($cachable = false, $urlparams = []) { $input = $this->app->getInput(); $cachable = true; // Load plugin language files. LanguageHelper::loadPluginLanguage(); // Set the default view name and format from the Request. $viewName = $input->get('view', 'search', 'word'); $input->set('view', $viewName); // Don't cache view for search queries if ($input->get('q', null, 'string') || $input->get('f', null, 'int') || $input->get('t', null, 'array')) { $cachable = false; } $safeurlparams = [ 'f' => 'INT', 'lang' => 'CMD', ]; return parent::display($cachable, $safeurlparams); } }