src/PDF.php
protected function generateView($view, $data = [])
    {
        if(is_null($this->viewPath)) {
            return $view;
        }

        $twig = new Twig_Environment(
            new Twig_Loader_Filesystem(realpath($this->viewPath))
        );

        return $twig->render($view, $data);
    }
protected function generateView($view, $data = [])
    {
        if(is_null($this->viewPath)) {
            return $view;
        }

        $twig = new Twig_Environment(
            new Twig_Loader_Filesystem(realpath($this->viewPath))
        );

        return $twig->render($view, $data);
    }
protected function generateView ( $ view , $ data = [ ] ) { if ( is_null ( $ this -> viewPath ) ) { return $ view ; } $ twig = new Twig_Environment ( new Twig_Loader_Filesystem ( realpath ( $ this -> viewPath ) ) ) ; return $ twig -> render ( $ view , $ data ) ; }
Generate view for the pdf file.

@param string $view
@param array  $data

@return string
Generate view for the pdf file .