private static function getDataArray()
    {
        if (self::$_dataArray === null) {
            $currentMenuItem = Yii::$app->menu->current;
            $array = [];
            foreach (Yii::$app->adminLanguage->getLanguages() as $lang) {
                $array[] = [
                    'lang' => $lang,
                    'item' => Yii::$app->menu->find()->where(['nav_id' => $currentMenuItem->navId])->lang($lang['short_code'])->with('hidden')->one(),
                ];
            }
            
            self::$_dataArray = $array;
        }
        
        return self::$_dataArray;
    }
private static function getDataArray()
    {
        if (self::$_dataArray === null) {
            $currentMenuItem = Yii::$app->menu->current;
            $array = [];
            foreach (Yii::$app->adminLanguage->getLanguages() as $lang) {
                $array[] = [
                    'lang' => $lang,
                    'item' => Yii::$app->menu->find()->where(['nav_id' => $currentMenuItem->navId])->lang($lang['short_code'])->with('hidden')->one(),
                ];
            }
            
            self::$_dataArray = $array;
        }
        
        return self::$_dataArray;
    }
private static function getDataArray ( ) { if ( self :: $ _dataArray === null ) { $ currentMenuItem = Yii :: $ app -> menu -> current ; $ array = [ ] ; foreach ( Yii :: $ app -> adminLanguage -> getLanguages ( ) as $ lang ) { $ array [ ] = [ 'lang' => $ lang , 'item' => Yii :: $ app -> menu -> find ( ) -> where ( [ 'nav_id' => $ currentMenuItem -> navId ] ) -> lang ( $ lang [ 'short_code' ] ) -> with ( 'hidden' ) -> one ( ) , ] ; } self :: $ _dataArray = $ array ; } return self :: $ _dataArray ; }
Add Singleton Container.

@return array
Add Singleton Container .