コード例 #1
0
ファイル: MarcRecord.php プロジェクト: bharatm/NDL-VuFind
 /**
  * Assign necessary Smarty variables and return a template name to
  * load in order to display holdings extracted from the base record
  * (i.e. URLs in MARC 856 fields) and, if necessary, the ILS driver.
  * Returns null if no data is available.
  *
  * @param array $patron An array of patron data
  *
  * @return string Name of Smarty template file to display.
  * @access public
  */
 public function getHoldings($patron = false)
 {
     global $configArray;
     global $interface;
     $disallowHolds = isset($configArray['Catalog']['disable_driver_hold_actions']) && array_intersect($this->fields['format'], $configArray['Catalog']['disable_driver_hold_actions']) ? true : false;
     if (!$disallowHolds && "driver" == CatalogConnection::getHoldsMode()) {
         $interface->assign('driverMode', true);
         if (!UserAccount::isLoggedIn()) {
             $interface->assign('showLoginMsg', true);
         }
     }
     if (!$disallowHolds && "driver" == CatalogConnection::getTitleHoldsMode()) {
         $interface->assign('titleDriverMode', true);
         if (!UserAccount::isLoggedIn()) {
             $interface->assign('showTitleLoginMsg', true);
         }
     }
     $interface->assign("holdingTitleHold", $this->getRealTimeTitleHold($patron));
     return parent::getHoldings($patron);
 }