Elgg  Version 4.3
EntityUrlHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Widgets;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20  $widget = $hook->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  }
37  }
38 }
Models an event passed to hook handlers.
Definition: Hook.php:11
__invoke(\Elgg\Hook $hook)
Returns widget URLS used in widget titles.
if($guid===false) $widget
Definition: add.php:30