diff options
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r-- | engine/lib/views.php | 19 |
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 |