dmBridge PHP API
DMTemplateEngineView.php
00001 <?php
00002 #
00003 # dmBridge: a data access framework for CONTENTdm(R)
00004 #
00005 # Copyright © 2009, 2010, 2011 Board of Regents of the Nevada System of Higher
00006 # Education, on behalf of the University of Nevada, Las Vegas
00007 #
00008 
00013 abstract class DMTemplateEngineView extends DMInternalView {
00014 
00018    private $collection;
00019 
00025    public function __construct(DMTemplate $tpl, DMSession $session,
00026          DMCollection $col) {
00027       parent::__construct($tpl, $session);
00028       $this->collection = $col;
00029    }
00030 
00034    public function getCollection() {
00035       return $this->collection;
00036    }
00037 
00042    public function getFavoritesView() {
00043       return new DMFavoritesView($this->getTemplate(), $this->getSession(),
00044             $this->getCollection());
00045    }
00046 
00047 
00052    public function getLoginView() {
00053       return new DMLoginView($this->getTemplate(), $this->getSession(),
00054             $this->getCollection());
00055    }
00056 
00061    public function getLogoutURI() {
00062       $params = "objects/logout";
00063       if ($this->getCollection() && !$this->getCollection()->isDefault()) {
00064          $params = "objects" . $this->getCollection()->getAlias()
00065                . "/logout";
00066       }
00067       return DMInternalURI::getURIWithParams($params);
00068    }
00069 
00074    public function getRecentlyViewedObjects($limit) {
00075       return $this->getSession()->getRecentlyViewedObjects($limit);
00076    }
00077 
00082    public function getSearchView() {
00083       return new DMSearchView($this->getTemplate(), $this->getSession(),
00084             $this->getCollection());
00085    }
00086 
00087 }
 All Data Structures Functions Variables