From da406b26dc0a6010c608981b414571cad78d8975 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 17 Jul 2018 11:16:09 -0400 Subject: [PATCH] Add last_pickup_date support to Demo driver. --- module/VuFind/src/VuFind/ILS/Driver/Demo.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index eda909acabe..c59fd803cf5 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -463,6 +463,11 @@ class Demo extends AbstractBase $currentItem['position'] = $pos; } else { $currentItem['available'] = true; + if (rand() % 3 != 1) { + $lastDate = strtotime('now + 3 days'); + $currentItem['last_pickup_date'] = $this->dateConverter + ->convertToDisplayDate('U', $lastDate); + } } $pos = rand(0, count($requestGroups) - 1); $currentItem['requestGroup'] = $requestGroups[$pos]['name']; -- GitLab