/** * Render a subview for this view * * All the styles and scripts of the subview will be added to the main view * * @param zibo\core\View $view the view to render * @return string The output of the view */ protected function renderView(View $view) { $renderedView = $view->render(true); if (!$view instanceof HtmlView) { return $renderedView; } $this->meta = Structure::merge($this->meta, $view->getMeta()); $this->styles = Structure::merge($this->styles, $view->getStyles()); $this->scripts = Structure::merge($this->scripts, $view->getJavascripts()); $this->inlineScripts = Structure::merge($this->inlineScripts, $view->getInlineJavascripts()); return $renderedView; }