Elgg  Version 3.0
upgrades.php
Go to the documentation of this file.
1 <?php
6 echo elgg_view('navigation/filter', [
7  'filter_id' => 'admin/upgrades',
8  'filter_value' => 'pending',
9 ]);
10 
11 $upgrades = _elgg_services()->upgrades->getPendingUpgrades();
12 if (empty($upgrades)) {
13  echo elgg_echo('admin:upgrades:none');
14  return;
15 }
16 
17 elgg_require_js('core/js/upgrader');
18 
19 elgg_register_menu_item('title', [
20  'name' => 'run_upgrades',
21  'icon' => 'play',
22  'text' => elgg_echo('admin:upgrades:run'),
23  'id' => 'elgg-upgrades-run',
24  'link_class' => 'elgg-button elgg-button-action',
25 ]);
26 
28  'limit' => false,
29  'pagination' => false,
30  'no_results' => elgg_echo('admin:upgrades:none'),
31 ]);
elgg_view_entity_list($entities, array $vars=[])
Returns a rendered list of entities with pagination.
Definition: views.php:996
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$upgrades
Lists pending upgrades.
Definition: upgrades.php:11
elgg_require_js($name)
Request that Elgg load an AMD module onto the page.
Definition: elgglib.php:168
elgg echo
Translates a string.
Definition: languages.js:43
elgg_register_menu_item($menu_name, $menu_item)
Register an item for an Elgg menu.
Definition: navigation.php:100
_elgg_services()
Get the global service provider.
Definition: elgglib.php:1292
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246