/** * Renders output content * * @return string * @throws Exception\InvalidViewComponentException */ public function render() { if (!$this->view || !$this->view instanceof ViewInterface) { throw new InvalidViewComponentException(); } foreach ($this->viewParams as $param => $value) { $this->view->setVar($param, $value); } ob_start(); $this->view->partial($this->templatePath, ['collections' => $this->collections]); $content = ob_get_contents(); ob_end_clean(); return $content; }