src/Controller/Index.php
protected function createViewModel(array $params, $terminal = false)
    {
        if (!isset($params['lang'])) {
            $params['lang'] = $this->params('lang');
        }


        $model = new ViewModel($params);
        $terminal && $model->setTerminal($terminal);

        return $model;
    }
protected function createViewModel(array $params, $terminal = false)
    {
        if (!isset($params['lang'])) {
            $params['lang'] = $this->params('lang');
        }


        $model = new ViewModel($params);
        $terminal && $model->setTerminal($terminal);

        return $model;
    }
protected function createViewModel ( array $ params , $ terminal = false ) { if ( ! isset ( $ params [ 'lang' ] ) ) { $ params [ 'lang' ] = $ this -> params ( 'lang' ) ; } $ model = new ViewModel ( $ params ) ; $ terminal && $ model -> setTerminal ( $ terminal ) ; return $ model ; }
Creates a view model

@param array $params
@param bool  $terminal

@return ViewModel
Creates a view model