Exemple #1
0
 /**
  * Renders and returns the pagination partial.
  *
  * @access  public
  * @param   string  $view  Pagination view
  * @return  string
  */
 public function render($view)
 {
     if (empty($this->viewFactory)) {
         throw new RuntimeException(vsprintf("%s(): A [ ViewFactory ] instance is required to render pagination views.", [__METHOD__]));
     }
     return $this->viewFactory->create($view, $this->paginate())->render();
 }
Exemple #2
0
 /**
  * Return rendered content using mako templates
  *
  * @access  protected
  * @param   string  $view  View path
  * @param   array   $data  View data
  * @return  string
  */
 protected function createView($view, array $data)
 {
     // Create view
     $view = $this->view->create($view, $data);
     // Return rendered view
     return $view->render();
 }
Exemple #3
0
 public function home(ViewFactory $view)
 {
     return $view->create('home');
 }
Exemple #4
0
 /**
  * Welcome route.
  *
  * @access  public
  * @param   \mako\view\ViewFactory  $view  View factory
  * @return  string
  */
 public function index(ViewFactory $view)
 {
     return $view->create('home/index');
 }