Elgg
Version 6.1
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
elgg_get_config
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
Definition:
configuration.php:136
$section
$section
Definition:
section.php:30
elgg_echo
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition:
languages.php:17
elgg_view
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition:
views.php:156
$results
$results
Definition:
content.php:22
elgg_view_message
elgg_view_message(string $type, string $body, array $vars=[])
Wrapper function for the message display pattern.
Definition:
views.php:940
elgg_generate_url
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.
Definition:
pagehandler.php:133
elgg_format_element
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition:
output.php:145
Generated on Wed Dec 4 2024 00:00:22 for Elgg by
1.8.11