31 if (
elgg_extract(
'segments', $current_route->getMatchedParameters()) !==
'plugins' && $current_route->getName() !==
'admin:plugin_settings') {
37 if (empty($active_plugins)) {
42 $plugins_with_settings = [];
44 foreach ($active_plugins as
$plugin) {
53 'name' =>
"plugin:settings:{$plugin_id}",
58 'section' =>
'plugin_settings',
62 if (empty($plugins_with_settings)) {
67 $return = $event->getValue();
69 ksort($plugins_with_settings);
71 foreach ($plugins_with_settings as $plugin_item) {
94 $return = $event->getValue();
97 'name' =>
'1_account',
98 'text' =>
elgg_echo(
'usersettings:user:opt:linktext'),
100 'username' =>
$user->username,
102 'section' =>
'configure',
106 'name' =>
'1_notifications',
107 'text' =>
elgg_echo(
'usersettings:notifications:menu:page'),
109 'username' =>
$user->username,
111 'section' =>
'configure',
115 'name' =>
'1_statistics',
116 'text' =>
elgg_echo(
'usersettings:statistics:opt:linktext'),
118 'username' =>
$user->username,
120 'section' =>
'configure',
128 'username' =>
$user->username,
130 'section' =>
'configure',
151 $return = $event->getValue();
154 'name' =>
'1_plugins',
155 'text' =>
elgg_echo(
'usersettings:plugins:opt:linktext'),
157 'section' =>
'configure',
158 'show_with_empty_children' =>
false,
162 foreach ($active_plugins as
$plugin) {
168 $title = $plugin->getDisplayName();
177 'username' =>
$user->username,
180 'parent_name' =>
'1_plugins',
181 'section' =>
'configure',
elgg_get_plugins(string $status= 'active')
Returns an ordered list of plugins.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
elgg_in_context(string $context)
Check if this context exists anywhere in the stack.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
$plugin_id
Remove all user and plugin settings from the give plugin ID.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_language_key_exists(string $key, string $language= 'en')
Check if a given language key exists.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_get_current_route()
Get the route for the current request.
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.
if(!$plugin) $plugin_name
elgg_view_exists(string $view, string $viewtype= '', bool $recurse=true)
Returns whether the specified view exists.
Models an event passed to event handlers.