/** * @param OverDriveRecordDriver $recordDriver */ function loadCitations($recordDriver) { global $interface; $citationCount = 0; $formats = $recordDriver->getCitationFormats(); foreach ($formats as $current) { $interface->assign(strtolower($current), $recordDriver->getCitation($current)); $citationCount++; } $interface->assign('citationCount', $citationCount); }
/** * @param OverDriveRecordDriver $overDriveRecordDriver * @return array */ public function getScopedAvailability($overDriveRecordDriver) { $availability = array(); $availability['mine'] = $overDriveRecordDriver->getAvailability(); $availability['other'] = array(); $scopingId = $this->getLibraryScopingId(); if ($scopingId != -1) { foreach ($availability['mine'] as $key => $availabilityItem) { if ($availabilityItem->libraryId != -1 && $availabilityItem->libraryId != $scopingId) { $availability['other'][$key] = $availability['mine'][$key]; unset($availability['mine'][$key]); } } } return $availability; }