25 private $widgetCache = array();
33 $widget_cache_key =
"$context-$owner_guid";
35 if (isset($this->widgetCache[$widget_cache_key])) {
36 return $this->widgetCache[$widget_cache_key];
41 'subtype' =>
'widget',
43 'private_setting_name' =>
'context',
52 $sorted_widgets = array();
54 if (!isset($sorted_widgets[(
int)$widget->column])) {
55 $sorted_widgets[(int)$widget->column] = array();
57 $sorted_widgets[(int)$widget->column][$widget->order] = $widget;
60 foreach ($sorted_widgets as $col => $widgets) {
61 ksort($sorted_widgets[$col]);
64 $this->widgetCache[$widget_cache_key] = $sorted_widgets;
66 return $sorted_widgets;
87 if (isset($access_id)) {
88 $widget->access_id = $access_id;
144 if (!isset($this->
widgets->handlers)) {
145 $this->
widgets->handlers = array();
148 $handlerobj =
new stdClass;
149 $handlerobj->name =
$name;
152 $handlerobj->multiple = $multiple;
171 if (!isset($this->
widgets->handlers)) {
189 !empty($this->
widgets->handlers) &&
190 is_array($this->
widgets->handlers) &&
205 empty($this->
widgets->handlers) ||
206 !is_array($this->
widgets->handlers)) {
237 empty($this->
widgets->handlers) ||
238 !is_array($this->
widgets->handlers)) {
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_get_entities_from_private_settings(array $options=array())
Returns entities based upon private settings.
if($screenshots) $description
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
Trigger a Plugin Hook and run all handler callbacks registered to that hook:type. ...
elgg_get_context()
Get the current context.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
get_default_access(ElggUser $user=null)
Gets the default access permission.
$user_guid
Avatar remove action.
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
get_entity($guid)
Loads and returns an entity object from a guid.
elgg layout widgets elgg widgets