Elgg  Version 4.3
WalledGarden.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Menus;
4 
6 
13 class WalledGarden {
14 
22  public static function registerHome(\Elgg\Hook $hook) {
24  return;
25  }
26 
27  /* @var $return MenuItems */
28  $return = $hook->getValue();
29 
30  $return[] = \ElggMenuItem::factory([
31  'name' => 'home',
32  'text' => elgg_echo('walled_garden:home'),
33  'href' => elgg_get_site_url(),
34  'priority' => 10,
35  ]);
36 
37  return $return;
38  }
39 }
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
Register menu items to the walled_garden menu.
elgg_get_current_url()
Returns the current page&#39;s complete URL.
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
static registerHome(\Elgg\Hook $hook)
Adds home link to walled garden menu.