Elgg  Version 3.0
content.php
Go to the documentation of this file.
1 <?php
6 $items = [
7  [
8  'name' => 'flush',
9  'text' => elgg_echo('admin:cache:flush'),
10  'icon' => 'sync-alt',
11  'href' => elgg_generate_action_url('admin/site/flush_cache'),
12  'link_class' => 'elgg-button elgg-button-action',
13  ],
14 ];
15 
16 if (!_elgg_services()->mutex->isLocked('upgrade')) {
17  $items[] = [
18  'name' => 'upgrade',
19  'text' => elgg_echo('upgrade'),
20  'icon' => 'cogs',
21  'href' => 'upgrade.php',
22  'link_class' => 'elgg-button elgg-button-action',
23  ];
24 } else {
25  $items[] = [
26  'name' => 'unlock_upgrade',
27  'text' => elgg_echo('upgrade:unlock'),
28  'icon' => 'unlock',
29  'href' => elgg_generate_action_url('admin/site/unlock_upgrade'),
30  'link_class' => 'elgg-button elgg-button-action',
31  'confirm' => elgg_echo('upgrade:unlock:confirm'),
32  ];
33 }
34 
35 echo elgg_view_menu('admin_control_panel', [
36  'class' => 'elgg-menu-hz',
37  'item_class' => 'mrm',
38  'items' => $items,
39 ]);
elgg_generate_action_url($action, array $query=[], $add_csrf_tokens=true)
Generate an action URL.
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_view_menu($menu, array $vars=[])
Render a menu.
Definition: views.php:755
elgg echo
Translates a string.
Definition: languages.js:43
_elgg_services()
Get the global service provider.
Definition: elgglib.php:1292
$items
Admin control panel widget.
Definition: content.php:6