Elgg  Version 4.3
AdminFooter.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Menus;
4 
6 
13 class AdminFooter {
14 
22  public static function registerHelpResources(\Elgg\Hook $hook) {
23  if (!elgg_is_admin_logged_in()) {
24  return;
25  }
26 
27  /* @var $return MenuItems */
28  $return = $hook->getValue();
29 
30  $return[] = \ElggMenuItem::factory([
31  'name' => 'faq',
32  'text' => elgg_echo('admin:footer:faq'),
33  'href' => 'http://learn.elgg.org/en/stable/appendix/faqs.html',
34  ]);
35 
36  $return[] = \ElggMenuItem::factory([
37  'name' => 'manual',
38  'text' => elgg_echo('admin:footer:manual'),
39  'href' => 'http://learn.elgg.org/en/stable/admin/index.html',
40  ]);
41 
42  $return[] = \ElggMenuItem::factory([
43  'name' => 'community_forums',
44  'text' => elgg_echo('admin:footer:community_forums'),
45  'href' => 'https://elgg.org/groups/all/',
46  ]);
47 
48  $return[] = \ElggMenuItem::factory([
49  'name' => 'blog',
50  'text' => elgg_echo('admin:footer:blog'),
51  'href' => 'https://elgg.org/blog/all',
52  ]);
53 
54  return $return;
55  }
56 }
Register menu items for the admin_footer menu.
Definition: AdminFooter.php:13
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:52
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
static factory($options)
Create an ElggMenuItem from an associative array.
Models an event passed to hook handlers.
Definition: Hook.php:11
static registerHelpResources(\Elgg\Hook $hook)
Add links to Elgg help resources.
Definition: AdminFooter.php:22