Elgg  Version 6.0
tabs.php
Go to the documentation of this file.
1 <?php
8 $selected = elgg_extract('selected', $vars, 'settings');
9 
10 $tabs = [
11  [
12  'name' => 'settings',
13  'text' => elgg_echo('admin:security:settings'),
14  'href' => elgg_generate_url('admin', [
15  'segments' => 'security',
16  ]),
17  'selected' => $selected === 'settings',
18  ],
19  [
20  'name' => 'security_txt',
21  'text' => elgg_echo('admin:security:security_txt'),
22  'href' => elgg_generate_url('admin', [
23  'segments' => 'security/security_txt',
24  ]),
25  'selected' => $selected === 'security_txt',
26  ],
27  [
28  'name' => 'information',
29  'text' => elgg_echo('admin:security:information'),
30  'href' => elgg_generate_url('admin', [
31  'segments' => 'security/information',
32  ]),
33  'selected' => $selected === 'information',
34  ],
35 ];
36 
37 echo elgg_view('navigation/tabs', [
38  'tabs' => $tabs,
39 ]);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$tabs
Definition: tabs.php:10
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
if(!isset($id)) $vars['id']
Definition: tabs.php:38
$selected
Admin helper view for tabs on the different security pages.
Definition: tabs.php:8
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.