Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function jsonFromSearchResults($rows, $from)
- {
- $objects = array();
- foreach ($rows as $row) {
- $images = array();
- for ($i=1;$i<=3;++$i) {
- $image = 'image' . $i;
- if ($row->$image) {
- $images[] = '<a href="' . $row->imageUrl($i) . '" rel="lightbox" style="color:#99f;">Id Proof '. $i . '</a>';
- }
- }
- $objects[$row->guest_id]
- = array('details' => $row->detailsForBooking(),
- 'images' => $images,
- 'show' => $this->view->Paths->guest_show($row->guest_id),
- 'stays' => $this->view->Paths->guest_stays($row->guest_id)
- );
- }
- return array('status' => 'ok', 'from' => $from, 'results' => $objects);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement