original_string: 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'));
      }
code: 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'));
      }
code_tokens: 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' ) ) ; }
docstring: Render the documentation page for the given project and version.
  
  @param string      $projectSlug
  @param string|null $ref
  @param string      $path
  @return $this
docstring_tokens: Render the documentation page for the given project and version .