コード例 #1
0
 static function getBookStores($libraryId)
 {
     $store = new BookStore();
     if ($libraryId == -1) {
         $store->orderBy('weight');
     } else {
         $store->query("SELECT {$store->__table}.* FROM {$store->__table} " . "INNER JOIN nearby_book_store ON ({$store->__table}.id=nearby_book_store.storeId) " . "WHERE libraryId={$libraryId} " . "ORDER BY weight");
     }
     $list = array();
     while ($store->fetch()) {
         $list[] = clone $store;
     }
     if (count($list) == 0) {
         $list = NearbyBookStore::getDefaultBookStores();
     }
     return $list;
 }
コード例 #2
0
ファイル: Library.php プロジェクト: victorfcm/VuFind-Plus
 static function getBookStores()
 {
     $library = Library::getActiveLibrary();
     if ($library) {
         return NearbyBookStore::getBookStores($library->libraryId);
     } else {
         return NearbyBookStore::getDefaultBookStores();
     }
 }