Elgg
Version 4.3
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
widgets
admin_welcome
content.php
Go to the documentation of this file.
1
<?php
6
// section => string replacements.
7
$sections
= [
8
'intro'
=> [],
9
'registration'
=> [
10
elgg_view
(
'output/url'
, [
11
'text'
=>
elgg_echo
(
'admin:site_settings'
),
12
'href'
=>
elgg_generate_url
(
'admin'
, [
13
'segments'
=>
'site_settings'
,
14
]),
15
'is_trusted'
=>
true
,
16
]),
17
],
18
'admin_overview'
=> [],
19
'outro'
=> [],
20
];
21
22
$results
=
''
;
23
foreach
(
$sections
as
$section
=> $strings) {
24
if
(
$section
===
'registration'
) {
25
if
(!
elgg_get_config
(
'allow_registration'
)) {
26
// registration is disabled, tell the admin
27
echo
elgg_view_message
(
'warning'
,
elgg_echo
(
"admin:widget:admin_welcome:{$section}"
, $strings));
28
}
29
30
continue
;
31
}
32
33
$results
.=
elgg_format_element
(
'p'
, [],
elgg_echo
(
"admin:widget:admin_welcome:{$section}"
, $strings));
34
}
35
36
echo
elgg_view
(
'output/longtext'
, [
'value'
=>
$results
,
'sanitize'
=>
false
]);
$sections
$sections
Welcome widget for admins.
Definition:
content.php:7
$section
$section
Definition:
section.php:29
elgg_echo
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition:
languages.php:18
elgg_view_message
elgg_view_message($type, $body, array $vars=[])
Wrapper function for the message display pattern.
Definition:
views.php:971
elgg_format_element
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition:
output.php:135
elgg_generate_url
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
Definition:
pagehandler.php:133
$results
$results
Definition:
content.php:22
echo
elgg echo
Translates a string.
Definition:
deprecated.js:530
elgg_view
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition:
views.php:179
elgg_get_config
elgg_get_config($name, $default=null)
Get an Elgg configuration value.
Definition:
configuration.php:141
Generated on Thu Jan 26 2023 00:00:24 for Elgg by
1.8.11