Skip to content
Snippets Groups Projects
Commit 513d2d61 authored by Demian Katz's avatar Demian Katz
Browse files

Reduced redundancy; added important missing fields.

parent e371f79e
No related merge requests found
...@@ -67,14 +67,19 @@ class Sample extends AbstractBase ...@@ -67,14 +67,19 @@ class Sample extends AbstractBase
*/ */
public function getStatus($id) public function getStatus($id)
{ {
$holding[] = array('availability' => 1, return array(
'status' => 'Available', array(
'location' => '3rd Floor Main Library', 'id' => $id,
'reserve' => 'No', 'availability' => 1,
'callnumber' => 'A1234.567', 'status' => 'Available',
'duedate' => '', 'location' => '3rd Floor Main Library',
'number' => 1); 'reserve' => 'N',
return $holding; 'callnumber' => 'A1234.567',
'duedate' => '',
'number' => 1,
'barcode' => '1234567890',
)
);
} }
/** /**
...@@ -91,16 +96,7 @@ class Sample extends AbstractBase ...@@ -91,16 +96,7 @@ class Sample extends AbstractBase
{ {
$items = array(); $items = array();
foreach ($ids as $id) { foreach ($ids as $id) {
$holding = array(); $items[] = $this->getStatus($id);
$holding[] = array('availability' => 1,
'id' => $id,
'status' => 'Available',
'location' => '3rd Floor Main Library',
'reserve' => 'No',
'callnumber' => 'A1234.567',
'duedate' => '',
'number' => 1);
$items[] = $holding;
} }
return $items; return $items;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment