create.php 522 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Group forum topic create river view.
  4. */
  5. $item = $vars['item'];
  6. /* @var ElggRiverItem $item */
  7. $object = $item->getObjectEntity();
  8. $excerpt = strip_tags($object->description);
  9. $excerpt = elgg_get_excerpt($excerpt);
  10. $responses = '';
  11. if (elgg_is_logged_in() && $object->canWriteToContainer()) {
  12. $responses = elgg_view('river/elements/discussion_replies', array('topic' => $object));
  13. }
  14. echo elgg_view('river/elements/layout', array(
  15. 'item' => $item,
  16. 'message' => $excerpt,
  17. 'responses' => $responses,
  18. ));