Elgg  Version 5.1
EntityUrlHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Widgets;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20  $widget = $event->getEntityParam();
21  if (!$widget instanceof \ElggWidget) {
22  return;
23  }
24 
25  switch ($widget->handler) {
26  case 'content_stats':
27  return 'admin/statistics';
28  case 'cron_status':
29  return 'admin/cron';
30  case 'banned_users':
31  return 'admin/users/banned';
32  case 'new_users':
33  return 'admin/users';
34  case 'online_users':
35  return 'admin/users/online';
36  case 'elgg_blog':
37  return 'https://elgg.org/blog/all';
38  }
39  }
40 }
__invoke(\Elgg\Event $event)
Returns widget URLS used in widget titles.
if($guid===false) $widget
Definition: add.php:31
Models an event passed to event handlers.
Definition: Event.php:11