Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Menus
Footer.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Menus
;
4
5
use
Elgg\Menu\MenuItems
;
6
13
class
Footer
{
14
22
public
static
function
registerRSS
(\
Elgg
\
Event
$event) {
23
24
if
(!
elgg_is_logged_in
() || !
_elgg_has_rss_link
()) {
25
return
;
26
}
27
28
/* @var $return MenuItems */
29
$return = $event->getValue();
30
31
$return[] =
\ElggMenuItem::factory
([
32
'name'
=>
'rss'
,
33
'icon'
=>
'rss-square'
,
34
'text'
=>
elgg_echo
(
'feed:rss'
),
35
'title'
=>
elgg_echo
(
'feed:rss:title'
),
36
'href'
=>
elgg_http_add_url_query_elements
(
elgg_get_current_url
(), [
37
'view'
=>
'rss'
,
38
]),
39
]);
40
41
return
$return;
42
}
43
51
public
static
function
registerElggBranding
(\
Elgg
\
Event
$event) {
52
if
(
_elgg_services
()->config->remove_branding) {
53
return
;
54
}
55
56
/* @var $return MenuItems */
57
$return = $event->getValue();
58
59
$return[] =
\ElggMenuItem::factory
([
60
'name'
=>
'powered'
,
61
'text'
=>
elgg_echo
(
'elgg:powered'
),
62
'href'
=>
'https://elgg.org'
,
63
'title'
=>
'Elgg '
.
elgg_get_release
(),
64
'section'
=>
'meta'
,
65
'priority'
=> 600,
66
]);
67
68
return
$return;
69
}
70
}
elgg_get_release
elgg_get_release()
Get the current Elgg release.
Definition:
configuration.php:102
Elgg\Menus\Footer\registerRSS
static registerRSS(\Elgg\Event $event)
Add the rss menu item.
Definition:
Footer.php:22
elgg_is_logged_in
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
Definition:
sessions.php:43
Elgg\Menus\Footer
Register menu items to the footer menu.
Definition:
Footer.php:13
elgg_echo
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition:
languages.php:17
ElggMenuItem\factory
static factory(array $options)
Create an ElggMenuItem from an associative array.
Definition:
ElggMenuItem.php:130
_elgg_has_rss_link
_elgg_has_rss_link()
Should the RSS view of this URL be linked to?
Definition:
views.php:1291
MenuItems
Elgg
Definition:
ActionsService.php:3
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_http_add_url_query_elements
elgg_http_add_url_query_elements(string $url, array $elements)
Sets elements in a URL's query string.
Definition:
elgglib.php:183
Elgg\Menus\Footer\registerElggBranding
static registerElggBranding(\Elgg\Event $event)
Add Elgg branding.
Definition:
Footer.php:51
_elgg_services
_elgg_services()
Get the global service provider.
Definition:
elgglib.php:353
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Generated on Wed Dec 4 2024 00:00:21 for Elgg by
1.8.11