| Server IP : 54.36.91.62 / Your IP : 216.73.217.111 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/amisdesseniors-fr/montpellier/components/com_menus/src/Dispatcher/ |
Upload File : |
<?php
/**
* @package Joomla.Site
* @subpackage com_menus
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Menus\Site\Dispatcher;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Dispatcher\ComponentDispatcher;
use Joomla\CMS\MVC\Controller\BaseController;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* ComponentDispatcher class for com_menus
*
* @since 4.0.0
*/
class Dispatcher extends ComponentDispatcher
{
/**
* Load the language
*
* @since 4.0.0
*
* @return void
*/
protected function loadLanguage()
{
$this->app->getLanguage()->load('com_menus', JPATH_ADMINISTRATOR);
}
/**
* Dispatch a controller task. Redirecting the user if appropriate.
*
* @return void
*
* @since 4.0.0
*/
public function checkAccess()
{
parent::checkAccess();
if (
$this->input->get('view') !== 'items'
|| $this->input->get('layout') !== 'modal'
|| !$this->app->getIdentity()->authorise('core.create', 'com_menus')
) {
throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403);
}
}
/**
* Get a controller from the component
*
* @param string $name Controller name
* @param string $client Optional client (like Administrator, Site etc.)
* @param array $config Optional controller config
*
* @return \Joomla\CMS\MVC\Controller\BaseController
*
* @since 4.0.0
*/
public function getController(string $name, string $client = '', array $config = []): BaseController
{
$config['base_path'] = JPATH_ADMINISTRATOR . '/components/com_menus';
$client = 'Administrator';
return parent::getController($name, $client, $config);
}
}