Elgg  Version master
nav.php
Go to the documentation of this file.
1 <?php
11 // has a refresh button been requested
12 $refresh = '';
13 if (elgg_extract('refresh', $vars)) {
14  $refresh = elgg_view('output/url', [
15  'text' => elgg_echo('install:refresh'),
16  'href' => elgg_get_current_url(),
17  'class' => ['elgg-button', 'elgg-button-action'],
18  ]);
19 }
20 
21 // create next button and selectively disable
23  'text' => elgg_echo('install:next'),
24  'href' => elgg_get_site_url() . "install.php?step={$vars['next_step']}",
25  'class' => ['elgg-button', 'elgg-button-submit'],
26 ];
27 
28 if (elgg_extract('advance', $vars) === false) {
29  // disable the next button
30  $next_options['class'][] = 'elgg-state-disabled';
31  $next_options['href'] = false;
32 }
33 
34 $next = elgg_view('output/url', $next_options);
35 
36 echo elgg_format_element('div', ['class' => 'elgg-install-nav'], $refresh . $next);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
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
elgg_get_current_url()
Returns the current page&#39;s complete URL.
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
$vars
Definition: theme.php:5
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145