public function render($template, $params = [])
    {
        $view = new View($this->app, new Theme());
        $params['generator'] = $this;

        return $view->renderFile($this->getTemplatePath() . '/' . $template, $params, $this);
    }
public function render($template, $params = [])
    {
        $view = new View($this->app, new Theme());
        $params['generator'] = $this;

        return $view->renderFile($this->getTemplatePath() . '/' . $template, $params, $this);
    }
public function render ( $ template , $ params = [ ] ) { $ view = new View ( $ this -> app , new Theme ( ) ) ; $ params [ 'generator' ] = $ this ; return $ view -> renderFile ( $ this -> getTemplatePath ( ) . '/' . $ template , $ params , $ this ) ; }
Generates code using the specified code template and parameters.
Note that the code template will be used as a PHP file.
@param string $template the code template file. This must be specified as a file path
relative to [[templatePath]].
@param array $params list of parameters to be passed to the template file.
@return string the generated code
Generates code using the specified code template and parameters . Note that the code template will be used as a PHP file .