aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-10-08 15:24:12 -0400
committerCash Costello <cash.costello@gmail.com>2011-10-08 15:24:12 -0400
commit41543b02582d1f923d5523c57ac66fa9ce61437d (patch)
tree8a2690a0c2743922d0e292e8bf0b246434c079d5 /engine/lib/views.php
parentd5f0d44d4ddf33db2248ef0bdd44633d57c31683 (diff)
downloadelgg-41543b02582d1f923d5523c57ac66fa9ce61437d.tar.gz
elgg-41543b02582d1f923d5523c57ac66fa9ce61437d.tar.bz2
Fixes #3937 updated the documentation for the access lib and a few minor code clean-ups
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index a18118f32..43725d3da 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1328,6 +1328,25 @@ function elgg_view_icon($name, $class = '') {
}
/**
+ * Displays a user's access collections, using the core/friends/collections view
+ *
+ * @param int $owner_guid The GUID of the owning user
+ *
+ * @return string A formatted rendition of the collections
+ * @todo Move to the friends/collection.php page.
+ */
+function elgg_view_access_collections($owner_guid) {
+ if ($collections = get_user_access_collections($owner_guid)) {
+ foreach ($collections as $key => $collection) {
+ $collections[$key]->members = get_members_of_access_collection($collection->id, true);
+ $collections[$key]->entities = get_user_friends($owner_guid, "", 9999);
+ }
+ }
+
+ return elgg_view('core/friends/collections', array('collections' => $collections));
+}
+
+/**
* Registers a function to handle templates.
*
* Alternative template handlers can be registered to handle