public function createURL($controller, $action = null, $params = array(), $module = null, $language = null)
    {
        if (null == $controller)
            $controller = $this->getController();
        if (!$this->SEO) {
            $params['controller'] = $controller;
            $mod = (null !== $module) ? $module : $this->getModule();
            if ($mod != $this->defaultModule) {
                $params['module'] = $mod;
            }
            if ($action)
                $params['action'] = $action;
            return '?' . http_build_query($params);
        }

        $url = $this->getLinkRoot();
        $language = $language ?: $this->language;
        if ($language != $this->defaultLanguage && (trim($language))) {
            $url = $this->getLinkRoot(false);
            $url .= $language . '/';
            if (!is_null($module) && ($module != $this->defaultModule)) {
                $url .= $module . '/';
            }
        }
        if ((!is_null($module)) && $module != $this->module) {
            if ($this->module != $this->defaultModule) {
                if ($module == $this->defaultModule) {
                    $url = str_replace('/' . $this->module . '/', '/', $url);
                } else {
                    $url = str_replace('/' . $this->module . '/', '/' . $module . '/', $url);
                    $params['module'] = $this->module;
                }
            } elseif ($module != $this->defaultModule) {
                $url .= $module . '/';
                $params['module'] = $module;
            }
        } elseif ($this->module) {
            $params['module'] = $this->module;
        }
        return $this->_createURL($url, $controller, $action, $this->_prepareParams($params));
    }
public function createURL($controller, $action = null, $params = array(), $module = null, $language = null)
    {
        if (null == $controller)
            $controller = $this->getController();
        if (!$this->SEO) {
            $params['controller'] = $controller;
            $mod = (null !== $module) ? $module : $this->getModule();
            if ($mod != $this->defaultModule) {
                $params['module'] = $mod;
            }
            if ($action)
                $params['action'] = $action;
            return '?' . http_build_query($params);
        }

        $url = $this->getLinkRoot();
        $language = $language ?: $this->language;
        if ($language != $this->defaultLanguage && (trim($language))) {
            $url = $this->getLinkRoot(false);
            $url .= $language . '/';
            if (!is_null($module) && ($module != $this->defaultModule)) {
                $url .= $module . '/';
            }
        }
        if ((!is_null($module)) && $module != $this->module) {
            if ($this->module != $this->defaultModule) {
                if ($module == $this->defaultModule) {
                    $url = str_replace('/' . $this->module . '/', '/', $url);
                } else {
                    $url = str_replace('/' . $this->module . '/', '/' . $module . '/', $url);
                    $params['module'] = $this->module;
                }
            } elseif ($module != $this->defaultModule) {
                $url .= $module . '/';
                $params['module'] = $module;
            }
        } elseif ($this->module) {
            $params['module'] = $this->module;
        }
        return $this->_createURL($url, $controller, $action, $this->_prepareParams($params));
    }
public function createURL ( $ controller , $ action = null , $ params = array ( ) , $ module = null , $ language = null ) { if ( null == $ controller ) $ controller = $ this -> getController ( ) ; if ( ! $ this -> SEO ) { $ params [ 'controller' ] = $ controller ; $ mod = ( null !== $ module ) ? $ module : $ this -> getModule ( ) ; if ( $ mod != $ this -> defaultModule ) { $ params [ 'module' ] = $ mod ; } if ( $ action ) $ params [ 'action' ] = $ action ; return '?' . http_build_query ( $ params ) ; } $ url = $ this -> getLinkRoot ( ) ; $ language = $ language ? : $ this -> language ; if ( $ language != $ this -> defaultLanguage && ( trim ( $ language ) ) ) { $ url = $ this -> getLinkRoot ( false ) ; $ url .= $ language . '/' ; if ( ! is_null ( $ module ) && ( $ module != $ this -> defaultModule ) ) { $ url .= $ module . '/' ; } } if ( ( ! is_null ( $ module ) ) && $ module != $ this -> module ) { if ( $ this -> module != $ this -> defaultModule ) { if ( $ module == $ this -> defaultModule ) { $ url = str_replace ( '/' . $ this -> module . '/' , '/' , $ url ) ; } else { $ url = str_replace ( '/' . $ this -> module . '/' , '/' . $ module . '/' , $ url ) ; $ params [ 'module' ] = $ this -> module ; } } elseif ( $ module != $ this -> defaultModule ) { $ url .= $ module . '/' ; $ params [ 'module' ] = $ module ; } } elseif ( $ this -> module ) { $ params [ 'module' ] = $ this -> module ; } return $ this -> _createURL ( $ url , $ controller , $ action , $ this -> _prepareParams ( $ params ) ) ; }
Get url to the selected page;
@param string $controller Name of the controller where the URL must link
@param string $action Name of the action where the URL must link
@param array $params List of associative parameters
@param string $module Name of the module where the URL must link. If you want to removed current module and go to default use false. If none it's set it will use current module;
@param string $language Language to use. Must exists in the list of available languages;
@return string
Get url to the selected page ;