aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index a18118f32..89ed98bdc 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -140,6 +140,7 @@ function elgg_register_viewtype($view_type) {
*
* @return bool
* @since 1.7.2
+ * @access private
*/
function elgg_is_valid_view_type($view_type) {
global $CONFIG;
@@ -1328,6 +1329,26 @@ 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.
+ * @access private
+ */
+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
@@ -1369,6 +1390,7 @@ function set_template_handler($function_name) {
* @since 1.7.0
* @todo Why isn't this used anywhere else but in elgg_view_tree()?
* Seems like a useful function for autodiscovery.
+ * @access private
*/
function elgg_get_views($dir, $base) {
$return = array();
@@ -1404,6 +1426,7 @@ function elgg_get_views($dir, $base) {
*
* @return array A list of view names underneath that root view
* @todo This is used once in the deprecated get_activity_stream_data() function.
+ * @access private
*/
function elgg_view_tree($view_root, $viewtype = "") {
global $CONFIG;
@@ -1465,6 +1488,7 @@ function elgg_view_tree($view_root, $viewtype = "") {
* @since 1.7.0
* @see elgg_set_view_location()
* @todo This seems overly complicated.
+ * @access private
*/
function autoregister_views($view_base, $folder, $base_location_path, $viewtype) {
if (!isset($i)) {
@@ -1506,6 +1530,7 @@ function autoregister_views($view_base, $folder, $base_location_path, $viewtype)
* Add the rss link to the extras when if needed
*
* @return void
+ * @access private
*/
function elgg_views_add_rss_link() {
global $autofeed;
@@ -1531,7 +1556,7 @@ function elgg_views_add_rss_link() {
* Registers deprecated views to avoid making some pages from older plugins
* completely empty.
*
- * @private
+ * @access private
*/
function elgg_views_handle_deprecated_views() {
$location = elgg_get_view_location('page_elements/contentwrapper');