38 static public function factory($container_guid, $use_cache =
true) {
42 static $cache = array();
44 if (!$container_guid) {
51 $container_guid = (int) $container_guid;
53 $cache_key =
"$container_guid|$user_guid";
54 if (empty($cache[$cache_key]) || !$use_cache) {
76 $ret->shouldHideItems =
true;
77 $ret->reasonHidden = self::REASON_NON_MEMBER;
80 $ret->shouldHideItems =
true;
81 $ret->reasonHidden = self::REASON_LOGGED_OUT;
85 $ret->shouldHideItems =
true;
86 $ret->reasonHidden = self::REASON_NO_ACCESS;
89 $cache[$cache_key] = $ret;
95 if (count($cache) > 500) {
97 unset($cache[key($cache)]);
static factory($container_guid, $use_cache=true)
Determine visibility of items within a container for the current user.
elgg_set_ignore_access($ignore=true)
Set if Elgg's access system should be ignored.
const CONTENT_ACCESS_MODE_MEMBERS_ONLY
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
$user_guid
Avatar remove action.
get_entity($guid)
Loads and returns an entity object from a guid.