Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Page
AddTitleHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Page
;
4
10
class
AddTitleHandler
{
11
19
public
function
__invoke
(\
Elgg
\
Event
$event) {
20
$head_params = $event->getValue();
21
22
$title
= $event->getParam(
'title'
);
23
if
(empty(
$title
)) {
24
$head_params[
'title'
] =
elgg_get_site_entity
()->getDisplayName();
25
}
else
{
26
$head_params[
'title'
] =
$title
.
' : '
.
elgg_get_site_entity
()->getDisplayName();
27
}
28
29
return
$head_params;
30
}
31
}
Elgg\Page\AddTitleHandler
Add title to page head.
Definition:
AddTitleHandler.php:10
$title
$title
Definition:
generic.php:50
Elgg
Definition:
ActionsService.php:3
Elgg\Page
Definition:
AddFaviconLinksHandler.php:3
elgg_get_site_entity
elgg_get_site_entity()
Get the current site entity.
Definition:
entities.php:101
Elgg\Page\AddTitleHandler\__invoke
__invoke(\Elgg\Event $event)
Add title to HTML head.
Definition:
AddTitleHandler.php:19
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