Exemple #1
0
 /**
  * Returns an associative array (action => description) of record tabs supported
  * by the data.
  *
  * @return array
  */
 public function getTabs()
 {
     // No Holdings tab in Summon module:
     $tabs = parent::getTabs();
     unset($tabs['Holdings']);
     return $tabs;
 }
Exemple #2
0
 /**
  * Returns an associative array (action => description) of record tabs supported
  * by the data.
  *
  * @return array
  */
 public function getTabs()
 {
     $tabs = parent::getTabs();
     // Check if we need to disable the holdings tab:
     if (isset($tabs['Holdings'])) {
         $config = ConfigReader::getConfig();
         if (isset($config->Site->hideHoldingsTabWhenEmpty) && $config->Site->hideHoldingsTabWhenEmpty) {
             $catalog = $this->getILS();
             if (!$catalog->hasHoldings($this->getUniqueID())) {
                 unset($tabs['Holdings']);
             }
         }
     }
     return $tabs;
 }