Trean_View_BookmarkList::render PHP Method

render() public method

Renders the view.
public render ( $title = null )
    public function render($title = null)
    {
        if (is_null($title)) {
            $title = _("Bookmarks");
        }
        $this->_getBookmarks();
        $browser = '';
        if ($this->_showTagBrowser) {
            $browser = '<br>' . $this->_getRelatedTags() . $this->_getTagTrail();
        }
        return '<h1 class="header">' . $title . '</h1>' . $browser . $this->_getBookmarkList();
    }

Usage Example

Example #1
0
 public function processRequest(Horde_Controller_Request $request, Horde_Controller_Response $response)
 {
     $path = $request->getPath();
     $pathParts = explode('/', $path);
     $tag = urldecode(array_pop($pathParts));
     $tagBrowser = new Trean_TagBrowser($this->getInjector()->getInstance('Trean_Tagger'), $tag);
     $view = new Trean_View_BookmarkList(null, $tagBrowser);
     $page_output = $this->getInjector()->getInstance('Horde_PageOutput');
     $notification = $this->getInjector()->getInstance('Horde_Notification');
     if ($GLOBALS['conf']['content_index']['enabled']) {
         $topbar = $this->getInjector()->getInstance('Horde_View_Topbar');
         $topbar->search = true;
         $topbar->searchAction = Horde::url('search.php');
     }
     Trean::addFeedLink();
     $title = sprintf(_("Tagged with %s"), urldecode($tag));
     $page_output->header(array('title' => $title));
     $notification->notify(array('listeners' => 'status'));
     echo $view->render($title);
     $page_output->footer();
 }
All Usage Examples Of Trean_View_BookmarkList::render