@@ -447,6 +447,64 @@ public function getHolding($id, $patron = null, array $options = [])
447447 return $ results ;
448448 }
449449
450+ /**
451+ * Get Departments
452+ *
453+ * Obtain a list of departments for use in limiting the reserves list.
454+ *
455+ * @return array An associative array with key = dept. ID, value = dept. name.
456+ */
457+ public function getDepartments ()
458+ {
459+ return ['Rechtswissenschaft ' , 'Volkswirtschaftslehre ' ];
460+ }
461+
462+ /**
463+ * Get Instructors
464+ *
465+ * Obtain a list of instructors for use in limiting the reserves list.
466+ *
467+ * @return array An associative array with key = ID, value = name.
468+ */
469+ public function getInstructors ()
470+ {
471+ return ['Jörg ' , 'Philipp ' , 'Stefan ' ];
472+ }
473+
474+ /**
475+ * Get New Items
476+ *
477+ * Retrieve the IDs of items recently added to the catalog.
478+ *
479+ * @param int $page Page number of results to retrieve (counting starts at 1)
480+ * @param int $limit The size of each page of results to retrieve
481+ * @param int $daysOld The maximum age of records to retrieve in days (max. 30)
482+ * @param int $fundId optional fund ID to use for limiting results (use a value
483+ * returned by getFunds, or exclude for no limit); note that "fund" may be a
484+ * misnomer - if funds are not an appropriate way to limit your new item
485+ * results, you can return a different set of values from getFunds. The
486+ * important thing is that this parameter supports an ID returned by getFunds,
487+ * whatever that may mean.
488+ *
489+ * @return array Associative array with 'count' and 'results' keys
490+ *
491+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
492+ */
493+ public function getNewItems ($ page , $ limit , $ daysOld , $ fundId = null )
494+ {
495+ return ['count ' => 0 , 'results ' => []];
496+
497+ // Pick a random number of results to return -- don't exceed limit or 30,
498+ // whichever is smaller (this can be pretty slow due to the random ID code).
499+ $ results = $ this ->config ['Records ' ]['new_items ' ]
500+ ?? $ this ->getRandomBibIds (30 );
501+ $ retVal = ['count ' => count ($ results ), 'results ' => []];
502+ foreach ($ results as $ result ) {
503+ $ retVal ['results ' ][] = ['id ' => $ result ];
504+ }
505+ return $ retVal ;
506+ }
507+
450508 /**
451509 * Check if request is valid
452510 *
@@ -1667,7 +1725,7 @@ public function findReserves($courseID, $instructorID, $departmentID)
16671725 $ listsBase . '/ ' . rawurlencode ($ listId ) . '/citations '
16681726 );
16691727 foreach ($ listXML as $ citation ) {
1670- $ reserves [$ citation ->id ] = $ citation ->metadata ;
1728+ $ reserves [( string ) $ citation ->id ] = $ citation ->metadata ;
16711729 }
16721730 }
16731731 return $ reserves ;
0 commit comments