public function createMenuItemUrl($params, $navItemId, $composition = null)
    {
        $composition = empty($composition) ? $this->getComposition() : $composition;
        $url = $this->internalCreateUrl($params, $composition);

        if (!$this->menu) {
            return $url;
        }

        return $this->urlReplaceModule($url, $navItemId, $composition);
    }
public function createMenuItemUrl($params, $navItemId, $composition = null)
    {
        $composition = empty($composition) ? $this->getComposition() : $composition;
        $url = $this->internalCreateUrl($params, $composition);

        if (!$this->menu) {
            return $url;
        }

        return $this->urlReplaceModule($url, $navItemId, $composition);
    }
public function createMenuItemUrl ( $ params , $ navItemId , $ composition = null ) { $ composition = empty ( $ composition ) ? $ this -> getComposition ( ) : $ composition ; $ url = $ this -> internalCreateUrl ( $ params , $ composition ) ; if ( ! $ this -> menu ) { return $ url ; } return $ this -> urlReplaceModule ( $ url , $ navItemId , $ composition ) ; }
Create an url for a menu item.

@param string|array $params Use a string to represent a route (e.g. `site/index`), or an array to represent a route with query parameters (e.g. `['site/index', 'param1' => 'value1']`).
@param integer $navItemId The nav item Id
@param null|\luya\web\Composition $composition Optional other composition config instead of using the default composition
@return string
Create an url for a menu item .