Elgg  Version 3.0
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 } elseif ($vars['num_warnings'] != 0) {
12  $instruct_text = elgg_echo('install:requirements:instructions:warning');
13 } else {
14  $instruct_text = elgg_echo('install:requirements:instructions:success');
15 }
16 
17 echo elgg_autop($instruct_text);
18 
19 $report = elgg_extract('report', $vars);
20 foreach ($report as $category => $checks) {
21  $title = elgg_echo("install:require:$category");
22  echo "<h3>$title</h3>";
23  echo "<ul class=\"elgg-require-$category\">";
24  foreach ($checks as $check) {
25  echo '<li>';
26  echo elgg_view_message(elgg_extract('severity', $check, 'notice'), elgg_autop($check['message']));
27  echo '</li>';
28  }
29  echo "</ul>";
30 }
31 
32 $vars['refresh'] = true;
33 
34 // cannot advance to next step with a failure
35 if ($vars['num_failures'] != 0) {
36  $vars['advance'] = false;
37 }
38 
39 echo elgg_view('install/nav', $vars);
$report
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_message($type, $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:1219
$title
Definition: user.php:20
elgg_autop($string)
Create paragraphs from text with line spacing.
Definition: output.php:58
elgg echo
Translates a string.
Definition: languages.js:43
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif(is_callable([$item, 'getType']))
Definition: item.php:39
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
foreach($report as $category=> $checks) $vars['refresh']
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246