frontend/controllers/SiteController.php
/**
     * Renders Site home page
     *
     * @return mixed
     */
Renders Site home page
@return mixed
Renders Site home page @return mixed
public function actionIndex()
    {
        $meta = $this->pages->getPageMetaData($this->param);
        $title = $this->pages->getPageTitle($this->param);
        $hosts = $this->hosts->getAllHosts();
        $popularHosts = $this->hosts->getPopularHosts(6);
        $url_lang = explode('-', Yii::$app->language);
        $lang_path = $url_lang[0];
        return $this->render('index', [
            'hosts' => $hosts,
            'popularHosts' => $popularHosts,
            'meta'=>$meta,
            'lang_path'=>$lang_path,
            'title'=>$title
        ]);
    }
public function actionIndex ( ) { $ meta = $ this -> pages -> getPageMetaData ( $ this -> param ) ; $ title = $ this -> pages -> getPageTitle ( $ this -> param ) ; $ hosts = $ this -> hosts -> getAllHosts ( ) ; $ popularHosts = $ this -> hosts -> getPopularHosts ( 6 ) ; $ url_lang = explode ( '-' , Yii :: $ app -> language ) ; $ lang_path = $ url_lang [ 0 ] ; return $ this -> render ( 'index' , [ 'hosts' => $ hosts , 'popularHosts' => $ popularHosts , 'meta' => $ meta , 'lang_path' => $ lang_path , 'title' => $ title ] ) ; }
Renders Site home page
 @return mixed
Renders Site home page @return mixed