Elgg  Version master
UpgradeCompletedAdminNoticeHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Upgrade;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20  $pending = _elgg_services()->upgrades->getPendingUpgrades();
21  if (empty($pending)) {
22  elgg_delete_admin_notice('pending_upgrades');
23  }
24  }
25 }
elgg_delete_admin_notice(string $id)
Remove an admin notice by ID.
Definition: admin.php:63
__invoke(\Elgg\Event $event)
Perform some clean up when upgrade completes.
_elgg_services()
Get the global service provider.
Definition: elgglib.php:351
Models an event passed to event handlers.
Definition: Event.php:11