This class manage the left menu of AlternC.
More...
This class manage the left menu of AlternC.
- Copyright
- AlternC-Team 2000-2017 https://alternc.com/
Definition at line 26 of file m_menu.php.
◆ getmenu()
get all menus to display, uses hooks
Definition at line 32 of file m_menu.php.
36 $mesq = $quota->getquota(
"",
true);
38 $lsto =
$hooks->invoke(
'hook_menu');
44 $lst = array_merge($sm, $lsto);
47 uasort($lst,
'm_menu::order_menu');
50 $mop =
$mem->session_tempo_params_get(
'menu_toggle');
52 foreach ($lst as $k => $v) {
60 if ($v[
'link'] ==
'toggle') {
61 $lst[$k][
'link'] =
'javascript:menu_toggle(\'menu-' . $k .
'\');
';
64 // Be sure that the default visibility is true
65 if (!isset($lst[$k]['visibility
'])) {
66 $lst[$k]['visibility
'] = true;
69 // Set the user's specific visibility option
70 if (isset($mop[
"menu-$k"])) {
71 if ($mop[
"menu-$k"] ==
"hidden") {
72 $lst[$k][
'visibility'] =
false;
74 if ($mop[
"menu-$k"] ==
"visible") {
75 $lst[$k][
'visibility'] =
true;
79 if (isset($mesq[$k])) {
81 if ($mesq[$k][
't'] < 1 && $mesq[$k][
'u'] < 1) {
87 $lst[$k][
'quota_used'] = $mesq[$k][
'u'];
88 $lst[$k][
'quota_total'] = $mesq[$k][
't'];
References $hooks, $mem, and system_menu().
◆ order_menu()
m_menu::order_menu |
( |
|
$a, |
|
|
|
$b |
|
) |
| |
utilitary function used by usort() to order menus
Definition at line 98 of file m_menu.php.
99 return $a[
'pos'] > $b[
'pos'];
◆ system_menu()
some menus that don't have an attached class
Definition at line 105 of file m_menu.php.
111 'title' => _(
"Home / Information"),
112 'link' =>
'main.php',
117 'title' => _(
"Logout"),
118 'link' =>
'mem_logout.php',
123 'title' => _(
"Online help"),
130 'title' => _(
"Languages"),
131 'visibility' =>
false,
137 foreach ($locales as $l) {
138 $m[
'lang'][
'links'][] = array(
'txt' => (isset($lang_translation[$l])) ? $lang_translation[$l] : $l,
'url' =>
"/login.php?setlang=$l");
References $help_baseurl.
Referenced by getmenu().
The documentation for this class was generated from the following file: