/** * Render a chapter * * @param string $path Path to the documentation * @param string $chapter ID of the chapter * @param string $url URL to replace links with * @param array $urlParams Additional URL parameters */ protected function renderChapter($path, $chapter, $url, array $urlParams = array()) { $parser = new DocParser($path); $section = new DocSectionRenderer($parser->getDocTree(), DocSectionRenderer::decodeUrlParam($chapter)); $this->view->section = $section->setUrl($url)->setUrlParams($urlParams)->setHighlightSearch($this->params->get('highlight-search')); $this->view->title = $chapter; $this->render('chapter', null, true); }
/** * Render a chapter * * @param string $path Path to the documentation * @param string $chapter ID of the chapter * @param string $url URL to replace links with * @param array $urlParams Additional URL parameters */ protected function renderChapter($path, $chapter, $url, array $urlParams = array()) { $parser = new DocParser($path); $section = new DocSectionRenderer($parser->getDocTree(), DocSectionRenderer::decodeUrlParam($chapter)); $this->view->section = $section->setUrl($url)->setUrlParams($urlParams)->setHighlightSearch($this->params->get('highlight-search')); $this->view->title = $chapter; $this->getTabs()->add('toc', array('active' => true, 'title' => ucfirst($chapter), 'url' => Url::fromRequest())); $this->render('chapter', null, true); }
/** * Render a chapter * * @param string $path Path to the documentation * @param string $chapter ID of the chapter * @param string $url URL to replace links with * @param string $imageUrl URL to images * @param array $urlParams Additional URL parameters */ protected function renderChapter($path, $chapter, $url, $imageUrl = null, array $urlParams = array()) { $parser = new DocParser($path); $section = new DocSectionRenderer($parser->getDocTree(), DocSectionRenderer::decodeUrlParam($chapter)); $this->view->section = $section->setHighlightSearch($this->params->get('highlight-search'))->setImageUrl($imageUrl)->setUrl($url)->setUrlParams($urlParams); $first = null; foreach ($section as $first) { break; } $title = $first === null ? ucfirst($chapter) : $first->getTitle(); $this->view->title = $title; $this->getTabs()->add('toc', array('active' => true, 'title' => $title, 'url' => Url::fromRequest())); $this->render('chapter', null, true); }