Elgg  Version master
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_import_esm('admin/upgrades');
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 
27 // make sure to use the same options as in \Elgg\UpgradeService::executeUpgrade()
30  'limit' => false,
31  'pagination' => false,
32  'no_results' => elgg_echo('admin:upgrades:none'),
33  ]);
34 });
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
Definition: elgglib.php:304
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$upgrades
Lists pending upgrades.
Definition: upgrades.php:11
const ELGG_IGNORE_ACCESS
elgg_call() flags
Definition: constants.php:121
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
const ELGG_SHOW_DISABLED_ENTITIES
Definition: constants.php:123
elgg_import_esm(string $name)
Helper functions for external files like css/js.
const ELGG_SHOW_DELETED_ENTITIES
Definition: constants.php:127
elgg_view_entity_list(array $entities, array $vars=[])
Returns a rendered list of entities with pagination.
Definition: views.php:636
_elgg_services()
Get the global service provider.
Definition: elgglib.php:351
elgg_register_menu_item(string $menu_name, array|\ElggMenuItem $menu_item)
Elgg navigation library Functions for managing menus and other navigational elements.
Definition: navigation.php:83