|
Elgg
Version 6.3
|
Go to the source code of this file.
Functions | |
| elgg_get_widgets (int $owner_guid, string $context) | |
| Elgg widgets library. More... | |
| elgg_create_widget (int $owner_guid, string $handler, string $context, ?int $access_id=null) | |
| Create a new widget instance. More... | |
| elgg_can_edit_widget_layout (string $context, int $user_guid=0) | |
| Can the user edit the widget layout. More... | |
| elgg_register_widget_type (array $options) | |
| Register a widget type. More... | |
| elgg_unregister_widget_type (string $handler) | |
| Remove a widget type. More... | |
| elgg_is_widget_type (string $handler, ?string $context=null, ?\ElggEntity $container=null) | |
| Has a widget type with the specified handler been registered. More... | |
| elgg_get_widget_types (string|array $context='') | |
| Get the widget types for a context. More... | |
| elgg_can_edit_widget_layout | ( | string | $context, |
| int | $user_guid = 0 |
||
| ) |
Can the user edit the widget layout.
Triggers a 'permissions_check', 'widget_layout' event
| string | $context | The widget context |
| int | $user_guid | The GUID of the user (0 for logged in user) |
Definition at line 50 of file widgets.php.
| elgg_create_widget | ( | int | $owner_guid, |
| string | $handler, | ||
| string | $context, | ||
| ?int | $access_id = null |
||
| ) |
Create a new widget instance.
| int | $owner_guid | GUID of entity that owns this widget |
| string | $handler | The handler for this widget |
| string | $context | The context for this widget |
| null | int | $access_id | If not specified, it is set to the default access level |
Definition at line 35 of file widgets.php.
| elgg_get_widget_types | ( | string|array | $context = '' | ) |
Get the widget types for a context.
If passing $context as an associative array you the following can be used: array ( 'context' => string (defaults to ''), 'exact' => bool (defaults to false), 'container' => \ElggEntity (defaults to null) ) The contents of the array will be passed to the 'handlers:widgets' event.
| array | string | $context | An associative array of options or the widget context |
Definition at line 112 of file widgets.php.
| elgg_get_widgets | ( | int | $owner_guid, |
| string | $context | ||
| ) |
Elgg widgets library.
Contains code for handling widgets. Get widgets for a particular context
The widgets are ordered for display and grouped in columns. $widgets = elgg_get_widgets(elgg_get_logged_in_user_guid(), 'dashboard'); $first_column_widgets = $widgets[1];
| int | $owner_guid | The owner GUID of the layout |
| string | $context | The context (profile, dashboard, etc) |
Definition at line 20 of file widgets.php.
| elgg_is_widget_type | ( | string | $handler, |
| ?string | $context = null, |
||
| ?\ElggEntity | $container = null |
||
| ) |
Has a widget type with the specified handler been registered.
| string | $handler | The widget handler identifying string |
| null | string | $context | Optional context to check |
| null | \ElggEntity | $container | Optional limit widget definitions to a container |
Definition at line 92 of file widgets.php.
| elgg_register_widget_type | ( | array | $options | ) |
Register a widget type.
This should be called by plugins in their init function.
| array | $options | An array of options |
Definition at line 64 of file widgets.php.
| elgg_unregister_widget_type | ( | string | $handler | ) |
Remove a widget type.
| string | $handler | The identifier for the widget |
Definition at line 78 of file widgets.php.