public function renderResults()
    {
        if (!$this->results && $this->query) {
            $this->performSearch();
        }

        if (!$this->outputController) {
            return user_error('Call renderResults() on a DocumentationViewer instance.', E_USER_ERROR);
        }
        
        $request = $this->outputController->getRequest();
        $data = $this->getSearchResults($request);
        $templates = array('DocumentationViewer_search');

        if ($request->requestVar('format') && $request->requestVar('format') == "atom") {
            // alter the fields for the opensearch xml.
            $title = ($title = $this->getTitle()) ? ' - '. $title : "";
            
            $link = Controller::join_links(
                $this->outputController->Link(),
                'DocumentationOpenSearchController/description/'
            );
            
            $data->setField('Title', $data->Title . $title);
            $data->setField('DescriptionURL', $link);
            
            array_unshift($templates, 'OpenSearchResults');
        }
        
        return $this->outputController->customise($data)->renderWith($templates);
    }
public function renderResults()
    {
        if (!$this->results && $this->query) {
            $this->performSearch();
        }

        if (!$this->outputController) {
            return user_error('Call renderResults() on a DocumentationViewer instance.', E_USER_ERROR);
        }
        
        $request = $this->outputController->getRequest();
        $data = $this->getSearchResults($request);
        $templates = array('DocumentationViewer_search');

        if ($request->requestVar('format') && $request->requestVar('format') == "atom") {
            // alter the fields for the opensearch xml.
            $title = ($title = $this->getTitle()) ? ' - '. $title : "";
            
            $link = Controller::join_links(
                $this->outputController->Link(),
                'DocumentationOpenSearchController/description/'
            );
            
            $data->setField('Title', $data->Title . $title);
            $data->setField('DescriptionURL', $link);
            
            array_unshift($templates, 'OpenSearchResults');
        }
        
        return $this->outputController->customise($data)->renderWith($templates);
    }
public function renderResults ( ) { if ( ! $ this -> results && $ this -> query ) { $ this -> performSearch ( ) ; } if ( ! $ this -> outputController ) { return user_error ( 'Call renderResults() on a DocumentationViewer instance.' , E_USER_ERROR ) ; } $ request = $ this -> outputController -> getRequest ( ) ; $ data = $ this -> getSearchResults ( $ request ) ; $ templates = array ( 'DocumentationViewer_search' ) ; if ( $ request -> requestVar ( 'format' ) && $ request -> requestVar ( 'format' ) == "atom" ) { // alter the fields for the opensearch xml. $ title = ( $ title = $ this -> getTitle ( ) ) ? ' - ' . $ title : "" ; $ link = Controller :: join_links ( $ this -> outputController -> Link ( ) , 'DocumentationOpenSearchController/description/' ) ; $ data -> setField ( 'Title' , $ data -> Title . $ title ) ; $ data -> setField ( 'DescriptionURL' , $ link ) ; array_unshift ( $ templates , 'OpenSearchResults' ) ; } return $ this -> outputController -> customise ( $ data ) -> renderWith ( $ templates ) ; }
Renders the search results into a template. Either the search results
template or the Atom feed.
Renders the search results into a template . Either the search results template or the Atom feed .