Elgg  Version master
requirements.php
Go to the documentation of this file.
1 <?php
9 if ($vars['num_failures'] != 0) {
10  $instruct_text = elgg_echo('install:requirements:instructions:failure');
11 
12  // cannot advance to next step with a failure
13  $vars['advance'] = false;
14  $vars['refresh'] = true;
15 } elseif ($vars['num_warnings'] != 0) {
16  $vars['refresh'] = true;
17  $instruct_text = elgg_echo('install:requirements:instructions:warning');
18 } else {
19  $instruct_text = elgg_echo('install:requirements:instructions:success');
20 }
21 
22 echo elgg_autop($instruct_text);
23 
24 $report = elgg_extract('report', $vars);
25 foreach ($report as $category => $checks) {
26  echo elgg_format_element('h3', [], elgg_echo("install:require:{$category}"));
27 
28  $list_items = '';
29  foreach ($checks as $check) {
30  $message = elgg_view_message(elgg_extract('severity', $check, 'notice'), elgg_autop($check['message']), ['icon_name' => false]);
32  }
33 
34  echo elgg_format_element('ul', ['class' => "elgg-require-{$category}"], $list_items);
35 }
36 
37 echo elgg_view('install/nav', $vars);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof\ElggRelationship) elseif(is_callable([$item, 'getType']))
Definition: item.php:48
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$list_items
Definition: categories.php:19
$report
$vars
Definition: theme.php:5
elgg_view_message(string $type, string $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:940
elgg_autop(string $string)
Create paragraphs from text with line spacing.
Definition: output.php:67
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145