public function actionNavLangItem($navId, $langId)
    {
        $item = NavItem::find()->with('nav')->where(['nav_id' => $navId, 'lang_id' => $langId])->one();
        if ($item) {
            return [
                'error' => false,
                'item' => $item->toArray(),
                'nav' => $item->nav->toArray(),
                'typeData' => ($item->nav_item_type == 1) ? NavItemPage::getVersionList($item->id) : ArrayHelper::typeCast($item->getType()->toArray()),
            ];
        }
        
        return ['error' => true];
    }
public function actionNavLangItem($navId, $langId)
    {
        $item = NavItem::find()->with('nav')->where(['nav_id' => $navId, 'lang_id' => $langId])->one();
        if ($item) {
            return [
                'error' => false,
                'item' => $item->toArray(),
                'nav' => $item->nav->toArray(),
                'typeData' => ($item->nav_item_type == 1) ? NavItemPage::getVersionList($item->id) : ArrayHelper::typeCast($item->getType()->toArray()),
            ];
        }
        
        return ['error' => true];
    }
public function actionNavLangItem ( $ navId , $ langId ) { $ item = NavItem :: find ( ) -> with ( 'nav' ) -> where ( [ 'nav_id' => $ navId , 'lang_id' => $ langId ] ) -> one ( ) ; if ( $ item ) { return [ 'error' => false , 'item' => $ item -> toArray ( ) , 'nav' => $ item -> nav -> toArray ( ) , 'typeData' => ( $ item -> nav_item_type == 1 ) ? NavItemPage :: getVersionList ( $ item -> id ) : ArrayHelper :: typeCast ( $ item -> getType ( ) -> toArray ( ) ) , ] ; } return [ 'error' => true ] ; }
The data api for a nav id and correspoding language.

http://example.com/admin/api-cms-navitem/nav-lang-item?access-token=XXX&navId=A&langId=B.

@param integer $navId
@param integer $langId
@return array
The data api for a nav id and correspoding language .