item.php 305 B

123456789101112131415
  1. <?php
  2. /**
  3. * JSON river item view
  4. *
  5. * @uses $vars['item']
  6. */
  7. $item = $vars['item'];
  8. $object = $item->toObject();
  9. if (elgg_view_exists($item->view, 'default')) {
  10. $object->description = elgg_view('river/elements/summary', array('item' => $item), FALSE, FALSE, 'default');
  11. }
  12. echo json_encode($object);