Elgg
Version 2.3
engine
classes
Elgg
Menu
UnpreparedMenu.php
Go to the documentation of this file.
1
<?php
2
namespace
Elgg\Menu
;
3
4
use
ElggMenuItem
;
5
11
class
UnpreparedMenu
{
12
16
private
$items;
17
21
private
$params;
22
33
public
function
__construct
(array $params, array $items) {
34
$this->params =
$params
;
35
$this->items =
$items
;
36
}
37
47
public
function
setSortBy
($sort_by =
'text'
) {
48
$this->params[
'sort_by'
] = $sort_by;
49
}
50
59
public
function
getSortBy
() {
60
return
elgg_extract
(
'sort_by'
, $this->params,
'text'
);
61
}
62
68
public
function
getName
() {
69
return
$this->params[
'name'
];
70
}
71
77
public
function
getItems
() {
78
return
$this->items;
79
}
80
86
public
function
getParams
() {
87
return
$this->params;
88
}
89
}
$params
$params
Definition:
login.php:72
ElggMenuItem
Definition:
ElggMenuItem.php:15
Elgg\Menu\UnpreparedMenu
Linear set of menu items collected from configuration and the "register" hook.
Definition:
UnpreparedMenu.php:11
Elgg\Menu\UnpreparedMenu\getName
getName()
Get the menu name.
Definition:
UnpreparedMenu.php:68
Elgg\Menu\UnpreparedMenu\__construct
__construct(array $params, array $items)
Constructor.
Definition:
UnpreparedMenu.php:33
Elgg\Menu\UnpreparedMenu\getItems
getItems()
Get the menu items.
Definition:
UnpreparedMenu.php:77
Elgg\Menu\UnpreparedMenu\getParams
getParams()
Get the menu parameters.
Definition:
UnpreparedMenu.php:86
Elgg\Menu\UnpreparedMenu\getSortBy
getSortBy()
Get the designated (or default) sort strategy.
Definition:
UnpreparedMenu.php:59
Elgg\Menu\UnpreparedMenu\setSortBy
setSortBy($sort_by='text')
Set how this menu should be sorted.
Definition:
UnpreparedMenu.php:47
elgg_extract
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition:
elgglib.php:1375
Elgg\Menu
Definition:
Menu.php:2
$items
$items
Definition:
delete.php:11
Generated on Fri Aug 29 2025 00:00:46 for Elgg by
1.9.1