ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMainMenuGUI Class Reference

Handles display of the main menu. More...

+ Collaboration diagram for ilMainMenuGUI:

Public Member Functions

 ilMainMenuGUI ($a_target="_top", $a_use_start_template=false)
 setMode ($a_value)
 getMode ()
 setTopBarBack ($a_url, $a_caption=null)
 getSpacerClass ()
 setActive ($a_active)
 setTemplate (&$tpl)
 set output template
 getTemplate ()
 get output template
 setLoginTargetPar ($a_val)
 Set target parameter for login (public sector).
 getLoginTargetPar ()
 Get target parameter for login.
 renderStatusBox ($a_tpl)
 Render status box.
 renderMainMenuListEntries ($a_tpl, $a_call_get=true)
 desc
 renderEntry ($a_tpl, $a_id, $a_txt, $a_script, $a_target="_top")
 Render main menu entry.
 getScriptTarget ($a_script)
 generates complete script target (private)
 _checkAdministrationPermission ()
 getHTML ()
 renderDropDown ($a_tpl, $a_id)
 GetDropDownHTML.
 renderHelpButtons ()
 Render help button.
 showLogoOnly ($a_value)
 Toggle rendering of main menu, search, user info.

Static Public Member Functions

static getLanguageSelection ($a_in_topbar=false)

Data Fields

 $ilias
 $tpl
 $target
 $start_template
 $mail
const MODE_FULL = 1
const MODE_TOPBAR_ONLY = 2
const MODE_TOPBAR_REDUCED = 3
const MODE_TOPBAR_MEMBERVIEW = 4

Protected Member Functions

 initMemberView ()
 Init member view type $lng.
 getHeaderURL ()

Protected Attributes

 $mode
 $topbar_back_url
 $topbar_back_caption

Detailed Description

Handles display of the main menu.

Author
Alex Killing
Version
Id:
class.ilMainMenuGUI.php 61735 2016-03-21 16:10:16Z gitmgr

Definition at line 13 of file class.ilMainMenuGUI.php.

Member Function Documentation

ilMainMenuGUI::_checkAdministrationPermission ( )

Definition at line 818 of file class.ilMainMenuGUI.php.

Referenced by ilObjMediaPoolGUI\createMediaFromUploadDir(), ilAdministrationGUI\executeCommand(), ilObjMediaPoolGUI\listMedia(), renderMainMenuListEntries(), and ilObjMediaPoolGUI\selectUploadDirFiles().

{
global $rbacsystem;
//if($rbacsystem->checkAccess("visible,read", SYSTEM_FOLDER_ID))
if($rbacsystem->checkAccess("visible", SYSTEM_FOLDER_ID))
{
return true;
}
return false;
}

+ Here is the caller graph for this function:

ilMainMenuGUI::getHeaderURL ( )
protected

Definition at line 1133 of file class.ilMainMenuGUI.php.

References ilUserUtil\getStartingPointAsUrl().

{
include_once './Services/User/classes/class.ilUserUtil.php';
if(!$url)
{
$url = "./goto.php?target=root_1";
}
return $url;
}

+ Here is the call graph for this function:

ilMainMenuGUI::getHTML ( )

Definition at line 830 of file class.ilMainMenuGUI.php.

{
// this is a workaround for bugs like 14016
// the main menu does not need the YUI connection, but many other
// features since they rely on il.Util.sendAjaxGetRequestToUrl (see Services/Javascript)
// which still uses YUI. This should be migrated to jQuery with a future major release
include_once "Services/YUI/classes/class.ilYuiUtil.php";
ilYUIUtil::initConnection();
$this->setTemplateVars();
return $this->tpl->get();
}
static ilMainMenuGUI::getLanguageSelection (   $a_in_topbar = false)
static

Definition at line 144 of file class.ilMainMenuGUI.php.

References $ilUser, $lng, and ilUtil\appendUrlParameterString().

{
global $lng;
global $ilUser;
include_once("./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
$gr_list = new ilGroupedListGUI();
$gr_list->setAsDropDown(true);
$languages = $lng->getInstalledLanguages();
if(sizeof($languages) > 1) // #11237
{
foreach ($languages as $lang_key)
{
$base = substr($_SERVER["REQUEST_URI"], strrpos($_SERVER["REQUEST_URI"], "/") + 1);
$base = preg_replace("/&*lang=[a-z]{2}&*/", "", $base);
"lang=".$lang_key);
$link = str_replace("?&", "?", $link);
$gr_list->addEntry($lng->_lookupEntry($lang_key, "meta", "meta_l_".$lang_key), $link);
}
return $gr_list->getHTML();
}
}

+ Here is the call graph for this function:

ilMainMenuGUI::getLoginTargetPar ( )

Get target parameter for login.

Definition at line 139 of file class.ilMainMenuGUI.php.

{
return $this->login_target_par;
}
ilMainMenuGUI::getMode ( )

Definition at line 75 of file class.ilMainMenuGUI.php.

References $mode.

Referenced by getSpacerClass(), and renderHelpButtons().

{
return $this->mode;
}

+ Here is the caller graph for this function:

ilMainMenuGUI::getScriptTarget (   $a_script)

generates complete script target (private)

Definition at line 798 of file class.ilMainMenuGUI.php.

References $ilias.

{
global $ilias;
$script = "./".$a_script;
//if ($this->start_template == true)
//{
//if(is_file("./templates/".$ilias->account->skin."/tpl.start.html"))
//{
// $script = "./start.php?script=".rawurlencode($script);
//}
//}
if (defined("ILIAS_MODULE"))
{
$script = ".".$script;
}
return $script;
}
ilMainMenuGUI::getSpacerClass ( )

Definition at line 86 of file class.ilMainMenuGUI.php.

References getMode().

{
switch($this->getMode())
{
case self::MODE_TOPBAR_ONLY:
case self::MODE_TOPBAR_REDUCED:
case self::MODE_TOPBAR_MEMBERVIEW:
return "ilFixedTopSpacerBarOnly";
case self::MODE_FULL:
return "ilFixedTopSpacer";
}
}

+ Here is the call graph for this function:

ilMainMenuGUI::getTemplate ( )

get output template

Definition at line 121 of file class.ilMainMenuGUI.php.

{
echo "ilMainMenu->getTemplate is deprecated. Use getHTML instead.";
return;
}
ilMainMenuGUI::ilMainMenuGUI (   $a_target = "_top",
  $a_use_start_template = false 
)
Parameters
string$a_targettarget frame
boolean$a_use_start_templatetrue means: target scripts should be called through start template

Definition at line 40 of file class.ilMainMenuGUI.php.

References $ilias, $ilUser, ilMemberViewSettings\getInstance(), ilMailGlobalServices\getMailObjectRefId(), initMemberView(), and setMode().

{
global $ilias, $rbacsystem, $ilUser;
$this->tpl = new ilTemplate("tpl.main_menu.html", true, true,
"Services/MainMenu");
$this->ilias =& $ilias;
$this->target = $a_target;
$this->start_template = $a_use_start_template;
$this->mail = false;
if($ilUser->getId() != ANONYMOUS_USER_ID)
{
if($rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))
{
$this->mail = true;
}
}
$this->setMode(self::MODE_FULL);
// member view
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
if($set->isActive())
{
$this->initMemberView();
}
}

+ Here is the call graph for this function:

ilMainMenuGUI::initMemberView ( )
protected

Init member view type $lng.

Definition at line 848 of file class.ilMainMenuGUI.php.

References $lng, $ref_id, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilMemberViewSettings\getInstance(), setMode(), and setTopBarBack().

Referenced by ilMainMenuGUI().

{
global $lng;
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
if(!$ref_id)
{
return FALSE;
}
include_once './Services/Link/classes/class.ilLink.php';
array('mv' => 0));
$this->setMode(self::MODE_TOPBAR_MEMBERVIEW);
$this->setTopBarBack($url, $lng->txt('mem_view_close'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMainMenuGUI::renderDropDown (   $a_tpl,
  $a_id 
)

GetDropDownHTML.

Parameters
@return

Definition at line 876 of file class.ilMainMenuGUI.php.

References $ilSetting, $ilUser, $lng, ilObjUserTracking\_enabledLearningProgress(), ilCalendarSettings\_getInstance(), ilMailGlobalServices\getMailObjectRefId(), and ilAdvancedSelectionListGUI\ICON_ARROW.

Referenced by renderMainMenuListEntries().

{
global $lng, $ilSetting, $rbacsystem;
$id = strtolower($a_id);
$id_up = strtoupper($a_id);
$a_tpl->setCurrentBlock("entry_".$id);
include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
$selection = new ilAdvancedSelectionListGUI();
if ($this->active == $a_id || ($this->active == "" && $a_id == "repository"))
{
$selection->setSelectionHeaderClass("MMActive");
$a_tpl->setVariable("SEL", '<span class="ilAccHidden">('.$lng->txt("stat_selected").')</span>');
}
else
{
$selection->setSelectionHeaderClass("MMInactive");
}
$selection->setSelectionHeaderSpanClass("MMSpan");
$selection->setHeaderIcon(ilAdvancedSelectionListGUI::ICON_ARROW);
$selection->setItemLinkClass("small");
$selection->setUseImages(false);
switch ($id)
{
// desktop drop down
case "desktop":
$selection->setListTitle($lng->txt("personal_desktop"));
$selection->setId("dd_pd");
// overview
$selection->addItem($lng->txt("overview"), "", "ilias.php?baseClass=ilPersonalDesktopGUI",
"", "", "_top");
if(!$ilSetting->get("disable_personal_workspace"))
{
// workspace
$selection->addItem($lng->txt("personal_workspace"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToWorkspace",
"", "", "_top");
}
// profile
$selection->addItem($lng->txt("personal_profile"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToProfile",
"", "", "_top");
// skills
$skmg_set = new ilSetting("skmg");
if ($skmg_set->get("enable_skmg"))
{
$selection->addItem($lng->txt("skills"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSkills",
"", "", "_top");
}
// portfolio
if ($ilSetting->get('user_portfolios'))
{
$selection->addItem($lng->txt("portfolio"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToPortfolio",
"", "", "_top");
}
// news
if ($ilSetting->get("block_activated_news"))
{
$selection->addItem($lng->txt("news"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNews",
"", "", "_top");
}
// Learning Progress
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
{
//$ilTabs->addTarget("learning_progress", $this->ctrl->getLinkTargetByClass("ilLearningProgressGUI"));
$selection->addItem($lng->txt("learning_progress"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToLP",
"", "", "_top");
}
// calendar
include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
if($settings->isEnabled())
{
$selection->addItem($lng->txt("calendar"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToCalendar",
"", "", "_top");
}
// mail
if($this->mail)
{
$selection->addItem($lng->txt('mail'), '', 'ilias.php?baseClass=ilMailGUI', '', '', '_top');
}
// contacts
if (!$this->ilias->getSetting('disable_contacts') &&
($this->ilias->getSetting('disable_contacts_require_mail') ||
$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId())))
{
$selection->addItem($lng->txt('mail_addressbook'), '', 'ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToContacts', '', '', '_top');
}
// private notes
if (!$this->ilias->getSetting("disable_notes"))
{
$selection->addItem($lng->txt("notes_and_comments"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNotes",
"", "", "_top");
}
// bookmarks
if (!$this->ilias->getSetting("disable_bookmarks"))
{
$selection->addItem($lng->txt("bookmarks"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToBookmarks",
"", "", "_top");
}
// settings
$selection->addItem($lng->txt("personal_settings"), "", "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSettings",
"", "", "_top");
break;
// shop
case 'shop':
$selection->setListTitle($lng->txt("shop"));
$selection->setId("dd_shp");
$selection->addItem($lng->txt("shop"), "", "ilias.php?baseClass=ilShopController&cmd=firstpage",
"", "", "_top");
break;
// administration
case "administration":
$selection->setListTitle($lng->txt("administration"));
$selection->setId("dd_adm");
$selection->setAsynch(true);
$selection->setAsynchUrl("ilias.php?baseClass=ilAdministrationGUI&cmd=getDropDown&cmdMode=asynch");
//$this->renderEntry($a_tpl, "administration",
// $lng->txt("administration"),
// $this->getScriptTarget("ilias.php?baseClass=ilAdministrationGUI"),
// $this->target);
break;
}
// $selection->setTriggerEvent("mouseover");
// $selection->setAutoHide(true);
// bs-patch start
global $ilUser;
$a_tpl->setVariable("TXT_ADMINISTRATION", $lng->txt("administration"));
$a_tpl->parseCurrentBlock();
return;
// bs-patch end
$html = $selection->getHTML();
$a_tpl->setVariable($id_up."_DROP_DOWN", $html);
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMainMenuGUI::renderEntry (   $a_tpl,
  $a_id,
  $a_txt,
  $a_script,
  $a_target = "_top" 
)

Render main menu entry.

Parameters
@return

Definition at line 515 of file class.ilMainMenuGUI.php.

References $_GET, $ilCtrl, $ilSetting, $ilUser, $lng, $separator, ilObjUserTracking\_enabledLearningProgress(), ilObject\_getIcon(), ilCalendarSettings\_getInstance(), ilLink\_getStaticLink(), ilObjUserTracking\_hasLearningProgressLearner(), ilObjUserTracking\_hasLearningProgressOtherUsers(), ilObject\_lookupObjId(), ilAccessKey\getKey(), ilMailGlobalServices\getMailObjectRefId(), ilHelp\getMainMenuTooltip(), ilUtil\img(), ilAccessKey\LAST_VISITED, ilAccessKey\PERSONAL_DESKTOP, and ilUtil\shortenText().

Referenced by renderMainMenuListEntries().

{
global $lng, $ilNavigationHistory, $ilSetting, $rbacsystem, $ilCtrl;
$id = strtolower($a_id);
$id_up = strtoupper($a_id);
$a_tpl->setCurrentBlock("entry_".$id);
include_once("./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
// repository
if ($a_id == "repository")
{
$gl = new ilGroupedListGUI();
$gl->setAsDropDown(true);
include_once("./Services/Link/classes/class.ilLink.php");
$gl->addEntry($icon." ".$a_txt." - ".$lng->txt("rep_main_page"), ilLink::_getStaticLink(1,'root',true),
"_top");
$items = $ilNavigationHistory->getItems();
reset($items);
$cnt = 0;
$first = true;
foreach($items as $k => $item)
{
if ($cnt >= 10) break;
if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) ||
($item["ref_id"] != $_GET["ref_id"] || !$first)) // do not list current item
{
if ($cnt == 0)
{
$gl->addGroupHeader($lng->txt("last_visited"), "ilLVNavEnt");
}
$obj_id = ilObject::_lookupObjId($item["ref_id"]);
$cnt ++;
$icon = ilUtil::img(ilObject::_getIcon($obj_id, "tiny"));
$ititle = ilUtil::shortenText(strip_tags($item["title"]), 50, true); // #11023
$gl->addEntry($icon." ".$ititle, $item["link"], "_top", "", "ilLVNavEnt");
}
$first = false;
}
if ($cnt > 0)
{
$gl->addEntry("» ".$lng->txt("remove_entries"), "#", "",
"return il.MainMenu.removeLastVisitedItems('".
$ilCtrl->getLinkTargetByClass("ilnavigationhistorygui", "removeEntries", "", true)."');",
"ilLVNavEnt");
}
$a_tpl->setVariable("REP_EN_OV", $gl->getHTML());
}
// desktop
if ($a_id == "desktop")
{
$gl = new ilGroupedListGUI();
$gl->setAsDropDown(true);
// overview
$gl->addEntry($lng->txt("overview"),
"ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSelectedItems",
"_top", "", "", "mm_pd_sel_items", ilHelp::getMainMenuTooltip("mm_pd_sel_items"),
"left center", "right center", false);
// my groups and courses, if both is available
if($ilSetting->get('disable_my_offers') == 0 &&
$ilSetting->get('disable_my_memberships') == 0)
{
$gl->addEntry($lng->txt("my_courses_groups"),
"ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToMemberships",
"_top", "", "", "mm_pd_crs_grp", ilHelp::getMainMenuTooltip("mm_pd_crs_grp"),
"left center", "right center", false);
}
// bookmarks
if (!$this->ilias->getSetting("disable_bookmarks"))
{
$gl->addEntry($lng->txt("bookmarks"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToBookmarks",
"_top", "", "", "mm_pd_bookm", ilHelp::getMainMenuTooltip("mm_pd_bookm"),
"left center", "right center", false);
}
// private notes
if (!$this->ilias->getSetting("disable_notes"))
{
$gl->addEntry($lng->txt("notes_and_comments"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNotes",
"_top", "", "", "mm_pd_notes", ilHelp::getMainMenuTooltip("mm_pd_notes"),
"left center", "right center", false);
}
// news
if ($ilSetting->get("block_activated_news"))
{
$gl->addEntry($lng->txt("news"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToNews",
"_top", "", "", "mm_pd_news", ilHelp::getMainMenuTooltip("mm_pd_news"),
"left center", "right center", false);
}
// overview is always active
$gl->addSeparator();
$separator = false;
if(!$ilSetting->get("disable_personal_workspace"))
{
// workspace
$gl->addEntry($lng->txt("personal_workspace"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToWorkspace",
"_top", "", "", "mm_pd_wsp", ilHelp::getMainMenuTooltip("mm_pd_wsp"),
"left center", "right center", false);
$separator = true;
}
// portfolio
if ($ilSetting->get('user_portfolios'))
{
$gl->addEntry($lng->txt("portfolio"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToPortfolio",
"_top", "", "", "mm_pd_port", ilHelp::getMainMenuTooltip("mm_pd_port"),
"left center", "right center", false);
$separator = true;
}
// skills
$skmg_set = new ilSetting("skmg");
if ($skmg_set->get("enable_skmg"))
{
$gl->addEntry($lng->txt("skills"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSkills",
"_top", "", "", "mm_pd_skill", ilHelp::getMainMenuTooltip("mm_pd_skill"),
"left center", "right center", false);
$separator = true;
}
// Learning Progress
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
{
//$ilTabs->addTarget("learning_progress", $this->ctrl->getLinkTargetByClass("ilLearningProgressGUI"));
$gl->addEntry($lng->txt("learning_progress"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToLP",
"_top", "", "", "mm_pd_lp", ilHelp::getMainMenuTooltip("mm_pd_lp"),
"left center", "right center", false);
$separator = true;
}
{
$gl->addSeparator();
}
$separator = false;
// calendar
include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
if($settings->isEnabled())
{
$gl->addEntry($lng->txt("calendar"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToCalendar",
"_top", "", "", "mm_pd_cal", ilHelp::getMainMenuTooltip("mm_pd_cal"),
"left center", "right center", false);
$separator = true;
}
// mail
if($this->mail)
{
$gl->addEntry($lng->txt('mail'), 'ilias.php?baseClass=ilMailGUI', '_top',
"", "", "mm_pd_mail", ilHelp::getMainMenuTooltip("mm_pd_mail"),
"left center", "right center", false);
$separator = true;
}
// contacts
if(!$this->ilias->getSetting('disable_contacts') &&
($this->ilias->getSetting('disable_contacts_require_mail') ||
$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId())))
{
$gl->addEntry($lng->txt('mail_addressbook'),
'ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToContacts', '_top'
, "", "", "mm_pd_contacts", ilHelp::getMainMenuTooltip("mm_pd_contacts"),
"left center", "right center", false);
$separator = true;
}
{
$gl->addSeparator();
}
// profile
$gl->addEntry($lng->txt("personal_profile"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToProfile",
"_top", "", "", "mm_pd_profile", ilHelp::getMainMenuTooltip("mm_pd_profile"),
"left center", "right center", false);
// settings
$gl->addEntry($lng->txt("personal_settings"), "ilias.php?baseClass=ilPersonalDesktopGUI&amp;cmd=jumpToSettings",
"_top", "", "", "mm_pd_sett", ilHelp::getMainMenuTooltip("mm_pd_sett"),
"left center", "right center", false);
$a_tpl->setVariable("DESK_CONT_OV", $gl->getHTML());
}
if(IS_PAYMENT_ENABLED)
{
// shop
if ($a_id == "shop")
{
$gl = new ilGroupedListGUI();
$gl->setAsDropDown(true);
// shop_content
$gl->addEntry($lng->txt("content"),
"ilias.php?baseClass=ilShopController&amp;cmd=firstpage",
"_top");
// shoppingcart
include_once 'Services/Payment/classes/class.ilPaymentShoppingCart.php';
global $ilUser;
$objShoppingCart = new ilPaymentShoppingCart($ilUser);
$items = $objShoppingCart->getEntries();
if(count($items) > 0 )
{
$gl->addEntry($lng->txt("shoppingcart").' ('.count($items).')',
"ilias.php?baseClass=ilShopController&amp;cmdClass=ilshopshoppingcartgui",
"_top");
}
$a_tpl->setVariable("SHOP_CONT_OV", $gl->getHTML());
}
}
$a_tpl->setVariable("TXT_".$id_up, $a_txt);
$a_tpl->setVariable("SCRIPT_".$id_up, $a_script);
$a_tpl->setVariable("TARGET_".$id_up, $a_target);
if ($this->active == $a_id || ($this->active == "" && $a_id == "repository"))
{
//$a_tpl->setVariable("MM_CLASS", "MMActive");
$a_tpl->setVariable("SEL", '<span class="ilAccHidden">('.$lng->txt("stat_selected").')</span>');
}
else
{
//$a_tpl->setVariable("MM_CLASS", "MMInactive");
}
if($a_id == "repository")
{
include_once("./Services/Accessibility/classes/class.ilAccessKey.php");
{
$a_tpl->setVariable("ACC_KEY_REPOSITORY", 'accesskey="'.
}
}
if($a_id == "desktop")
{
include_once("./Services/Accessibility/classes/class.ilAccessKey.php");
{
$a_tpl->setVariable("ACC_KEY_DESKTOP", 'accesskey="'.
}
}
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMainMenuGUI::renderHelpButtons ( )

Render help button.

Parameters
@return

Definition at line 1042 of file class.ilMainMenuGUI.php.

References $ilCtrl, $ilSetting, $ilUser, $lng, $tpl, ilTooltipGUI\addTooltip(), getMode(), and MODE_FULL.

{
global $ilHelp, $lng, $ilCtrl, $tpl, $ilSetting, $ilUser;
// screen id
if (defined("OH_REF_ID") && OH_REF_ID > 0)
{
if ($ilHelp->getScreenId() != "")
{
if($this->getMode() == self::MODE_FULL)
{
$this->tpl->setCurrentBlock("screen_id");
$this->tpl->setVariable("SCREEN_ID", $ilHelp->getScreenId());
$this->tpl->parseCurrentBlock();
}
}
}
$help_active = false;
include_once("./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php");
$helpl = new ilGroupedListGUI();
$helpl->setAsDropDown(true, true);
if ($ilHelp->hasSections())
{
$help_active = true;
$lng->loadLanguageModule("help");
//$this->tpl->setCurrentBlock("help_icon");
// add javascript needed by help (to do: move to help class)
$tpl->addJavascript("./Services/Help/js/ilHelp.js");
include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
$acc = new ilAccordionGUI();
$acc->addJavascript();
$acc->addCss();
include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
ilTooltipGUI::addTooltip("help_tr", $lng->txt("help_open_online_help"), "",
"bottom center", "top center", false);
$helpl->addEntry("<span>&nbsp;</span> ".$lng->txt("help_topcis"), "#", "", "il.Help.listHelp(event, false);");
}
$module_id = (int) $ilSetting->get("help_module");
if ((OH_REF_ID > 0 || $module_id > 0) && $ilUser->getLanguage() == "de" &&
$ilSetting->get("help_mode") != "1")
{
$help_active = true;
$lng->loadLanguageModule("help");
$tpl->addJavascript("./Services/Help/js/ilHelp.js");
include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
ilTooltipGUI::addTooltip("help_tt", $lng->txt("help_toggle_tooltips"), "",
"bottom center", "top center", false);
$helpl->addEntry('<span id="help_tt_switch_on" class="glyphicon glyphicon-ok"></span> '.$lng->txt("help_tooltips"), "#", "", "return il.Help.switchTooltips(event);");
}
if($help_active)
{
$this->tpl->setCurrentBlock("help");
$this->tpl->setVariable("TXT_HELP", $lng->txt("help"));
$this->tpl->setVariable("HELP_SELECT", $helpl->getHTML());
$this->tpl->parseCurrentBlock();
// always set ajax url
$ts = $ilCtrl->getTargetScript();
$ilCtrl->setTargetScript("ilias.php");
$ilHelp->setCtrlPar();
$tpl->addOnLoadCode("il.Help.setAjaxUrl('".
$ilCtrl->getLinkTargetByClass("ilhelpgui", "", "", true)
."');");
$ilCtrl->setTargetScript($ts);
}
}

+ Here is the call graph for this function:

ilMainMenuGUI::renderMainMenuListEntries (   $a_tpl,
  $a_call_get = true 
)

desc

Parameters
@return

Definition at line 459 of file class.ilMainMenuGUI.php.

References $_SESSION, $ilias, $ilSetting, $ilUser, $lng, $nd, _checkAdministrationPermission(), renderDropDown(), and renderEntry().

{
global $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilAccess;
// personal desktop
if ($_SESSION["AccountId"] != ANONYMOUS_USER_ID)
{
$this->renderEntry($a_tpl, "desktop",
$lng->txt("personal_desktop"), "#");
}
// repository
if($ilAccess->checkAccess('visible','',ROOT_FOLDER_ID))
{
include_once('./Services/Link/classes/class.ilLink.php');
$nd = $tree->getNodeData(ROOT_FOLDER_ID);
$title = $nd["title"];
if ($title == "ILIAS")
{
$title = $lng->txt("repository");
}
if ($_SESSION["AccountId"] != ANONYMOUS_USER_ID || IS_PAYMENT_ENABLED)
{
$this->renderEntry($a_tpl, "repository",
$title, "#");
}
}
// webshop
if(IS_PAYMENT_ENABLED)
{
$title = $lng->txt("shop");
$this->renderEntry($a_tpl, "shop", $title, "#" );
}
// administration
{
$this->renderDropDown($a_tpl, "administration");
}
if ($a_call_get)
{
return $a_tpl->get();
}
return "";
}

+ Here is the call graph for this function:

ilMainMenuGUI::renderStatusBox (   $a_tpl)

Render status box.

Definition at line 421 of file class.ilMainMenuGUI.php.

References $ilUser, $lng, ilUtil\getImagePath(), and ilMailGlobalServices\getNumberOfNewMailsByUserId().

{
global $ilUser, $lng;
$box = false;
// new mails?
if($this->mail)
{
$new_mails = ilMailGlobalServices::getNumberOfNewMailsByUserId($ilUser->getId());
if($new_mails > 0)
{
$a_tpl->setCurrentBlock('status_text');
$a_tpl->setVariable('STATUS_TXT', $new_mails);
$a_tpl->parseCurrentBlock();
}
$a_tpl->setCurrentBlock('status_item');
$a_tpl->setVariable('STATUS_IMG', ilUtil::getImagePath('icon_mail.svg'));
$a_tpl->setVariable('STATUS_IMG_ALT', $lng->txt("mail"));
$a_tpl->setVariable('STATUS_HREF', 'ilias.php?baseClass=ilMailGUI');
$a_tpl->parseCurrentBlock();
$box = true;
}
if ($box)
{
$a_tpl->setCurrentBlock("status_box");
$a_tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilMainMenuGUI::setActive (   $a_active)
Parameters
string$a_active"desktop"|"repository"|"search"|"mail"|"chat_invitation"|"administration"

Definition at line 103 of file class.ilMainMenuGUI.php.

{
$this->active = $a_active;
}
ilMainMenuGUI::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Definition at line 131 of file class.ilMainMenuGUI.php.

{
$this->login_target_par = $a_val;
}
ilMainMenuGUI::setMode (   $a_value)

Definition at line 70 of file class.ilMainMenuGUI.php.

Referenced by ilMainMenuGUI(), and initMemberView().

{
$this->mode = (int)$a_value;
}

+ Here is the caller graph for this function:

ilMainMenuGUI::setTemplate ( $tpl)

set output template

Definition at line 111 of file class.ilMainMenuGUI.php.

References $tpl.

{
echo "ilMainMenu->setTemplate is deprecated. Use getHTML instead.";
return;
$this->tpl =& $tpl;
}
ilMainMenuGUI::setTopBarBack (   $a_url,
  $a_caption = null 
)

Definition at line 80 of file class.ilMainMenuGUI.php.

Referenced by initMemberView().

{
$this->topbar_back_url = $a_url;
$this->topbar_back_caption = trim($a_caption);
}

+ Here is the caller graph for this function:

ilMainMenuGUI::showLogoOnly (   $a_value)

Toggle rendering of main menu, search, user info.

See Also
ilImprintGUI
Parameters
bool$a_value

Definition at line 1128 of file class.ilMainMenuGUI.php.

{
$this->logo_only = (bool)$a_value;
}

Field Documentation

ilMainMenuGUI::$ilias
ilMainMenuGUI::$mail

Definition at line 24 of file class.ilMainMenuGUI.php.

ilMainMenuGUI::$mode
protected

Definition at line 26 of file class.ilMainMenuGUI.php.

Referenced by getMode().

ilMainMenuGUI::$start_template

Definition at line 23 of file class.ilMainMenuGUI.php.

ilMainMenuGUI::$target

Definition at line 22 of file class.ilMainMenuGUI.php.

ilMainMenuGUI::$topbar_back_caption
protected

Definition at line 28 of file class.ilMainMenuGUI.php.

ilMainMenuGUI::$topbar_back_url
protected

Definition at line 27 of file class.ilMainMenuGUI.php.

ilMainMenuGUI::$tpl

Definition at line 21 of file class.ilMainMenuGUI.php.

Referenced by renderHelpButtons(), and setTemplate().

const ilMainMenuGUI::MODE_FULL = 1
const ilMainMenuGUI::MODE_TOPBAR_MEMBERVIEW = 4

Definition at line 33 of file class.ilMainMenuGUI.php.

const ilMainMenuGUI::MODE_TOPBAR_ONLY = 2
const ilMainMenuGUI::MODE_TOPBAR_REDUCED = 3

Definition at line 32 of file class.ilMainMenuGUI.php.

Referenced by ilTemplate\setLocator().


The documentation for this class was generated from the following file: