create.php 972 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Image album view
  4. *
  5. * @author Cash Costello
  6. * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2
  7. */
  8. $subject = $vars['item']->getSubjectEntity();
  9. $subject_link = elgg_view('output/url', array(
  10. 'href' => $subject->getURL(),
  11. 'text' => $subject->name,
  12. 'class' => 'elgg-river-subject',
  13. 'is_trusted' => true,
  14. ));
  15. $image = $vars['item']->getObjectEntity();
  16. $attachments = elgg_view_entity_icon($image, 'tiny');
  17. $image_link = elgg_view('output/url', array(
  18. 'href' => $image->getURL(),
  19. 'text' => $image->getTitle(),
  20. 'is_trusted' => true,
  21. ));
  22. $album_link = elgg_view('output/url', array(
  23. 'href' => $image->getContainerEntity()->getURL(),
  24. 'text' => $image->getContainerEntity()->getTitle(),
  25. 'is_trusted' => true,
  26. ));
  27. echo elgg_view('river/elements/layout', array(
  28. 'item' => $vars['item'],
  29. 'attachments' => $attachments,
  30. 'summary' => elgg_echo('image:river:created', array($subject_link, $image_link, $album_link)),
  31. ));