/** * 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(); }
/** * 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(); }
public function home(ViewFactory $view) { return $view->create('home'); }
/** * Welcome route. * * @access public * @param \mako\view\ViewFactory $view View factory * @return string */ public function index(ViewFactory $view) { return $view->create('home/index'); }