26 private $widgetCache = array();
34 $widget_cache_key =
"$context-$owner_guid";
36 if (isset($this->widgetCache[$widget_cache_key])) {
37 return $this->widgetCache[$widget_cache_key];
42 'subtype' =>
'widget',
44 'private_setting_name' =>
'context',
53 $sorted_widgets = array();
55 if (!isset($sorted_widgets[(
int)
$widget->column])) {
56 $sorted_widgets[(int)
$widget->column] = array();
61 foreach ($sorted_widgets as $col =>
$widgets) {
62 ksort($sorted_widgets[$col]);
65 $this->widgetCache[$widget_cache_key] = $sorted_widgets;
67 return $sorted_widgets;
88 if (isset($access_id)) {
89 $widget->access_id = $access_id;
142 if (!isset($this->widgets)) {
143 $this->widgets = new \stdClass;
145 if (!isset($this->widgets->handlers)) {
146 $this->widgets->handlers = array();
149 $handlerobj = new \stdClass;
150 $handlerobj->name =
$name;
153 $handlerobj->multiple = $multiple;
155 $this->widgets->handlers[
$handler] = $handlerobj;
168 if (!isset($this->widgets)) {
172 if (!isset($this->widgets->handlers)) {
176 if (isset($this->widgets->handlers[
$handler])) {
177 unset($this->widgets->handlers[
$handler]);
189 if (!empty($this->widgets) &&
190 !empty($this->widgets->handlers) &&
191 is_array($this->widgets->handlers) &&
192 array_key_exists(
$handler, $this->widgets->handlers)) {
205 if (empty($this->widgets) ||
206 empty($this->widgets->handlers) ||
207 !is_array($this->widgets->handlers)) {
213 foreach ($this->widgets->handlers as
$key =>
$handler) {
225 if (isset($this->widgets->handlers[
$handler])) {
226 return $this->widgets->handlers[
$handler]->name;
237 if (empty($this->widgets) ||
238 empty($this->widgets->handlers) ||
239 !is_array($this->widgets->handlers)) {
249 foreach ($this->widgets->handlers as
$key =>
$handler) {
if($guid==elgg_get_logged_in_user_guid()) $name
$user_guid
Avatar remove action.
get_default_access(ElggUser $user=null, array $input_params=array())
Gets the default access permission.
get_entity($guid)
Loads and returns an entity object from a guid.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_get_context()
Get the current context.
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
if($screenshots) $description
elgg_get_entities_from_private_settings(array $options=array())
Returns entities based upon private settings.