code/libraries/joomlatools/library/view/template.php
public function getRoute($route = '', $fqr = true, $escape = true)
    {
        if(is_string($route)) {
            parse_str(trim($route), $parts);
        } else {
            $parts = $route;
        }

        //Check to see if there is component information in the route if not add it
        if (!isset($parts['component'])) {
            $parts['component'] = $this->getIdentifier()->package;
        }

        //Add the view information to the route if it's not set
        if (!isset($parts['view'])) {
            $parts['view'] = $this->getName();
        }

        if (!isset($parts['layout']) && !empty($this->_layout))
        {
            if (($parts['component'] == $this->getIdentifier()->package) && ($parts['view'] == $this->getName())) {
                $parts['layout'] = $this->getLayout();
            }
        }

        return parent::getRoute($parts, $fqr, $escape);
    }
public function getRoute($route = '', $fqr = true, $escape = true)
    {
        if(is_string($route)) {
            parse_str(trim($route), $parts);
        } else {
            $parts = $route;
        }

        //Check to see if there is component information in the route if not add it
        if (!isset($parts['component'])) {
            $parts['component'] = $this->getIdentifier()->package;
        }

        //Add the view information to the route if it's not set
        if (!isset($parts['view'])) {
            $parts['view'] = $this->getName();
        }

        if (!isset($parts['layout']) && !empty($this->_layout))
        {
            if (($parts['component'] == $this->getIdentifier()->package) && ($parts['view'] == $this->getName())) {
                $parts['layout'] = $this->getLayout();
            }
        }

        return parent::getRoute($parts, $fqr, $escape);
    }
public function getRoute ( $ route = '' , $ fqr = true , $ escape = true ) { if ( is_string ( $ route ) ) { parse_str ( trim ( $ route ) , $ parts ) ; } else { $ parts = $ route ; } //Check to see if there is component information in the route if not add it if ( ! isset ( $ parts [ 'component' ] ) ) { $ parts [ 'component' ] = $ this -> getIdentifier ( ) -> package ; } //Add the view information to the route if it's not set if ( ! isset ( $ parts [ 'view' ] ) ) { $ parts [ 'view' ] = $ this -> getName ( ) ; } if ( ! isset ( $ parts [ 'layout' ] ) && ! empty ( $ this -> _layout ) ) { if ( ( $ parts [ 'component' ] == $ this -> getIdentifier ( ) -> package ) && ( $ parts [ 'view' ] == $ this -> getName ( ) ) ) { $ parts [ 'layout' ] = $ this -> getLayout ( ) ; } } return parent :: getRoute ( $ parts , $ fqr , $ escape ) ; }
Creates a route based on a full or partial query string.

This function adds the layout information to the route if a layout has been set

@param string|array $route   The query string used to create the route
@param boolean $fqr          If TRUE create a fully qualified route. Default TRUE.
@param boolean $escape       If TRUE escapes the route for xml compliance. Default TRUE.
@return  KDispatcherRouterRoute The route
Creates a route based on a full or partial query string .