public function document($projectSlug, $ref = null, $path = '')
    {
        $project = $this->factory->getProject($projectSlug);

        if (is_null($ref)) {
            $ref = $project->getDefaultRef();
        }
        $project->setRef($ref);

        $document   = $project->getDocument($path);
        $content    = $document->render();
        $breadcrumb = $document->getBreadcrumb();


        $this->view->composer($document->attr('view'), $this->factory->config('projects_menus_view_composer'));

        return  $this->view->make($document->attr('view'), compact('project', 'document', 'content', 'breadcrumb'));
    }
public function document($projectSlug, $ref = null, $path = '')
    {
        $project = $this->factory->getProject($projectSlug);

        if (is_null($ref)) {
            $ref = $project->getDefaultRef();
        }
        $project->setRef($ref);

        $document   = $project->getDocument($path);
        $content    = $document->render();
        $breadcrumb = $document->getBreadcrumb();


        $this->view->composer($document->attr('view'), $this->factory->config('projects_menus_view_composer'));

        return  $this->view->make($document->attr('view'), compact('project', 'document', 'content', 'breadcrumb'));
    }
public function document ( $ projectSlug , $ ref = null , $ path = '' ) { $ project = $ this -> factory -> getProject ( $ projectSlug ) ; if ( is_null ( $ ref ) ) { $ ref = $ project -> getDefaultRef ( ) ; } $ project -> setRef ( $ ref ) ; $ document = $ project -> getDocument ( $ path ) ; $ content = $ document -> render ( ) ; $ breadcrumb = $ document -> getBreadcrumb ( ) ; $ this -> view -> composer ( $ document -> attr ( 'view' ) , $ this -> factory -> config ( 'projects_menus_view_composer' ) ) ; return $ this -> view -> make ( $ document -> attr ( 'view' ) , compact ( 'project' , 'document' , 'content' , 'breadcrumb' ) ) ; }
Render the documentation page for the given project and version.

@param string      $projectSlug
@param string|null $ref
@param string      $path
@return $this
Render the documentation page for the given project and version .