Elgg  Version 4.3
content.php
Go to the documentation of this file.
1 <?php
6 // section => string replacements.
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
Welcome widget for admins.
Definition: content.php:7
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_view_message($type, $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:965
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
$results
Definition: content.php:22
elgg echo
Translates a string.
Definition: deprecated.js:530
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:179
elgg_get_config($name, $default=null)
Get an Elgg configuration value.