aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/friends/content.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets/friends/content.php')
-rw-r--r--views/default/widgets/friends/content.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php
new file mode 100644
index 000000000..98814c244
--- /dev/null
+++ b/views/default/widgets/friends/content.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Friend widget display view
+ *
+ */
+
+// owner of the widget
+$owner = $vars['entity']->getOwnerEntity();
+
+// the number of friends to display
+$num = (int) $vars['entity']->num_display;
+
+// get the correct size
+$size = $vars['entity']->icon_size;
+
+if (elgg_instanceof($owner, 'user')) {
+ $html = $owner->listFriends('', $num, array(
+ 'size' => $size,
+ 'list_type' => 'gallery',
+ 'pagination' => false
+ ));
+ if ($html) {
+ echo $html;
+ }
+}