/**
 * Part of Component Remoteimage files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
use Windwalker\Router\CmsRouter;
use Windwalker\Router\Helper\RoutingHelper;
include_once JPATH_ADMINISTRATOR . '/components/com_remoteimage/src/init.php';
// Prepare Router
$router = CmsRouter::getInstance('com_remoteimage');
// Register routing config and inject Router object into it.
$router = RoutingHelper::registerRouting($router, 'com_remoteimage');
if (!function_exists('RemoteimageBuildRoute')) {
    /**
     * RemoteimageBuildRoute
     *
     * @param array &$query
     *
     * @return  array
     */
    function RemoteimageBuildRoute(&$query)
    {
        $segments = array();
        $router = CmsRouter::getInstance('com_remoteimage');
        $query = \Windwalker\Router\Route::build($query);
        if (!empty($query['view'])) {
            $segments = $router->build($query['view'], $query);
Exemple #2
0
/**
 * Part of Component Userxtd files.
 *
 * @copyright   Copyright (C) 2014 Asikart. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
// No direct access
defined('_JEXEC') or die;
use Windwalker\Router\CmsRouter;
use Windwalker\Router\Helper\RoutingHelper;
include_once JPATH_ADMINISTRATOR . '/components/com_userxtd/src/init.php';
// Prepare Router
$router = CmsRouter::getInstance('com_userxtd');
// Register routing config and inject Router object into it.
$router = RoutingHelper::registerRouting($router, 'com_userxtd');
/**
 * UserxtdBuildRoute
 *
 * @param array &$query
 *
 * @return  array
 */
function UserxtdBuildRoute(&$query)
{
    $segments = array();
    $router = CmsRouter::getInstance('com_userxtd');
    $query = \Windwalker\Router\Route::build($query);
    if (!empty($query['_resource'])) {
        $segments = $router->build($query['_resource'], $query);
        unset($query['_resource']);