Skip to content

Commit

Permalink
Namespace the component router
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Apr 14, 2019
1 parent de18958 commit 42f6d98
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 78 deletions.
47 changes: 47 additions & 0 deletions components/com_privacy/Service/Router.php
@@ -0,0 +1,47 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_privacy
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Privacy\Site\Router;

defined('_JEXEC') or die;

use Joomla\CMS\Component\Router\RouterView;
use Joomla\CMS\Component\Router\RouterViewConfiguration;
use Joomla\CMS\Component\Router\Rules\MenuRules;
use Joomla\CMS\Component\Router\Rules\NomenuRules;
use Joomla\CMS\Component\Router\Rules\StandardRules;

/**
* Routing class from com_privacy
*
* @since 3.9.0
*/
class Router extends RouterView
{
/**
* Privacy Component router constructor
*
* @param JApplicationCms $app The application object
* @param JMenu $menu The menu object to work with
*
* @since 3.9.0
*/
public function __construct($app = null, $menu = null)
{
$this->registerView(new RouterViewConfiguration('confirm'));
$this->registerView(new RouterViewConfiguration('request'));
$this->registerView(new RouterViewConfiguration('remind'));

parent::__construct($app, $menu);

$this->attachRule(new MenuRules($this));
$this->attachRule(new StandardRules($this));
$this->attachRule(new NomenuRules($this));
}
}
78 changes: 0 additions & 78 deletions components/com_privacy/router.php

This file was deleted.

0 comments on commit 42f6d98

Please sign in to comment.