public function getPageLink($navId, $target, $lang = null)
    {
        $linkQuery = Yii::$app->menu->find();
        $linkQuery->where(['nav_id' => $navId]);
        $linkQuery->with(['hidden']);
        if ($lang) {
            $linkQuery->lang($lang);
        }
        $link = $linkQuery->one();
        
        // if a page is found, set the target value from the config.
        if ($link) {
            $link->setTarget($target);
        }
        
        return $link;
    }
public function getPageLink($navId, $target, $lang = null)
    {
        $linkQuery = Yii::$app->menu->find();
        $linkQuery->where(['nav_id' => $navId]);
        $linkQuery->with(['hidden']);
        if ($lang) {
            $linkQuery->lang($lang);
        }
        $link = $linkQuery->one();
        
        // if a page is found, set the target value from the config.
        if ($link) {
            $link->setTarget($target);
        }
        
        return $link;
    }
public function getPageLink ( $ navId , $ target , $ lang = null ) { $ linkQuery = Yii :: $ app -> menu -> find ( ) ; $ linkQuery -> where ( [ 'nav_id' => $ navId ] ) ; $ linkQuery -> with ( [ 'hidden' ] ) ; if ( $ lang ) { $ linkQuery -> lang ( $ lang ) ; } $ link = $ linkQuery -> one ( ) ; // if a page is found, set the target value from the config. if ( $ link ) { $ link -> setTarget ( $ target ) ; } return $ link ; }
Get CMS Page Link Object.

@param integer $navId
@param string $target
@param string $lang
@return \luya\cms\menu\Item|boolean
Get CMS Page Link Object .