dmBridge PHP API
DMResultsView.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 
00015 class DMResultsView extends DMTemplateEngineView implements DMURIAddressable {
00016 
00020    private $query;
00021 
00028    public function __construct(DMTemplate $tpl, DMSession $session,
00029          DMCollection $col, DMQuery $query = null) {
00030       parent::__construct($tpl, $session, $col);
00031       $this->setHelper(new DMResultsTemplateHelper($this, $session));
00032       $this->query = $query;
00033    }
00034 
00038    public function getQuery() {
00039       return $this->query;
00040    }
00041 
00045    public function getFields() {
00046       return $this->getCollection()->getResultsViewFields();
00047    }
00048 
00052    public function getNumTileViewColumns() {
00053       return $this->getTemplate()->getTemplateSet()->getNumTileViewColumns();
00054    }
00055 
00059    public function getURI() {
00060       $params = "objects";
00061       if ($this->getCollection() && !$this->getCollection()->isDefault()) {
00062          $params = "objects" . $this->getCollection()->getAlias();
00063       }
00064       return DMInternalURI::getURIWithParams($params);
00065    }
00066 
00067 }
00068 
 All Data Structures Functions Variables