public function actionItems($langId, $containerId)
    {
        $items = Nav::find()
            ->where(['nav_container_id' => $containerId, 'is_offline' => false, 'ni.lang_id' => $langId, 'is_deleted' => false])
            ->joinWith(['navItems ni'])
            ->asArray()
            ->all();
        $result = [];

        foreach ($items as $item) {
            // rename from navItems to item
            $item['item'] = reset($item['navItems']);
            unset($item['navItems']);
            $result[$item['parent_nav_id']][] = $item;
        }

        return $result;
    }
public function actionItems($langId, $containerId)
    {
        $items = Nav::find()
            ->where(['nav_container_id' => $containerId, 'is_offline' => false, 'ni.lang_id' => $langId, 'is_deleted' => false])
            ->joinWith(['navItems ni'])
            ->asArray()
            ->all();
        $result = [];

        foreach ($items as $item) {
            // rename from navItems to item
            $item['item'] = reset($item['navItems']);
            unset($item['navItems']);
            $result[$item['parent_nav_id']][] = $item;
        }

        return $result;
    }
public function actionItems ( $ langId , $ containerId ) { $ items = Nav :: find ( ) -> where ( [ 'nav_container_id' => $ containerId , 'is_offline' => false , 'ni.lang_id' => $ langId , 'is_deleted' => false ] ) -> joinWith ( [ 'navItems ni' ] ) -> asArray ( ) -> all ( ) ; $ result = [ ] ; foreach ( $ items as $ item ) { // rename from navItems to item $ item [ 'item' ] = reset ( $ item [ 'navItems' ] ) ; unset ( $ item [ 'navItems' ] ) ; $ result [ $ item [ 'parent_nav_id' ] ] [ ] = $ item ; } return $ result ; }
Provides all menu items for a given langId and containerId index by the parent_nav_id.

@param $langId
@param $containerId
@since 1.0.3
Provides all menu items for a given langId and containerId index by the parent_nav_id .