Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Menus
WalledGarden.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Menus
;
4
5
use
Elgg\Menu\MenuItems
;
6
13
class
WalledGarden
{
14
22
public
static
function
registerHome
(\
Elgg
\
Event
$event) {
23
if
(
elgg_get_current_url
() ===
elgg_get_site_url
()) {
24
return
;
25
}
26
27
/* @var $return MenuItems */
28
$return = $event->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
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition:
languages.php:17
Elgg\Menus\WalledGarden\registerHome
static registerHome(\Elgg\Event $event)
Adds home link to walled garden menu.
Definition:
WalledGarden.php:22
ElggMenuItem\factory
static factory(array $options)
Create an ElggMenuItem from an associative array.
Definition:
ElggMenuItem.php:130
MenuItems
Elgg
Definition:
ActionsService.php:3
Elgg\Menus\WalledGarden
Register menu items to the walled_garden menu.
Definition:
WalledGarden.php:13
Elgg\Menus
Definition:
AdminControlPanel.php:3
elgg_get_current_url
elgg_get_current_url()
Returns the current page's complete URL.
Definition:
pagehandler.php:121
elgg_get_site_url
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
Definition:
configuration.php:26
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Generated on Sat Dec 21 2024 00:02:52 for Elgg by
1.8.11