dmBridge PHP API
DMFavoritesView.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 class DMFavoritesView extends DMResultsView implements DMURIAddressable {
00014 
00021    public function __construct(DMTemplate $tpl, DMSession $session,
00022          DMCollection $col = null, DMQuery $query = null) {
00023       parent::__construct($tpl, $session, $col, $query);
00024       $this->setHelper(new DMFavoritesTemplateHelper($this, $session));
00025    }
00026 
00030    public function getAccessibleFavorites() {
00031       return $this->getSession()->getAccessibleFavorites(
00032             $this->getTemplate()->getTemplateSet());
00033    }
00034 
00038    public function getAllFavorites() {
00039       return $this->getSession()->getAllFavorites();
00040    }
00041 
00046    public function getURI() {
00047       $params = "objects/favorites";
00048       if ($this->getCollection() && !$this->getCollection()->isDefault()) {
00049          $params = "objects" . $this->getCollection()->getAlias()
00050                . "/favorites";
00051       }
00052       return DMInternalURI::getURIWithParams($params);
00053    }
00054 
00055 }
00056 
 All Data Structures Functions Variables