ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
LTI\ilMainMenuGUI Class Reference

Handles display of the main menu for LTI. More...

+ Inheritance diagram for LTI\ilMainMenuGUI:
+ Collaboration diagram for LTI\ilMainMenuGUI:

Public Member Functions

 __construct ($a_target="_top", $a_use_start_template=false, $a_main_tpl=null)
 
 getSpacerClass ()
 
 setTemplateVars ()
 set all template variables (images, scripts, target frames, ...) More...
 
- Public Member Functions inherited from ilMainMenuGUI
 __construct ($a_target="_top", $a_use_start_template=false, ilTemplate $a_main_tpl=null)
 
 setMode ($a_value)
 
 getMode ()
 
 setTopBarBack ($a_url, $a_caption=null)
 
 getSpacerClass ()
 
 setActive ($a_active)
 
 setLoginTargetPar ($a_val)
 Set target parameter for login (public sector). More...
 
 getLoginTargetPar ()
 Get target parameter for login. More...
 
 setTemplateVars ()
 set all template variables (images, scripts, target frames, ...) More...
 
 renderStatusBox ($a_tpl)
 Render status box. More...
 
 renderMainMenuListEntries ($a_tpl, $a_call_get=true)
 desc More...
 
 renderEntry ($a_tpl, $a_id, $a_txt, $a_script, $a_target="_top")
 Render main menu entry. More...
 
 getScriptTarget ($a_script)
 generates complete script target (private) More...
 
 getHTML ()
 
 renderDropDown ($a_tpl, $a_id)
 GetDropDownHTML. More...
 
 renderHelpButtons ()
 Render help button. More...
 
 renderAwareness ()
 Render awareness tool. More...
 
 showLogoOnly ($a_value)
 Toggle rendering of main menu, search, user info. More...
 

Private Member Functions

 log ($txt)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilMainMenuGUI
static getLanguageSelection ($a_in_topbar=false)
 
static _checkAdministrationPermission ()
 
- Data Fields inherited from ilMainMenuGUI
 $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 inherited from ilMainMenuGUI
 initMemberView ()
 Init member view type $lng. More...
 
 populateWithBuddySystem ()
 Includes all buddy system/user connections related javascript code. More...
 
 populateWithOnScreenChat ()
 
 renderOnScreenChatMenu ()
 
 renderOnScreenNotifications (\ilObjUser $user, \ilTemplate $mainTpl, \ilLanguage $lng)
 
 getHeaderURL ()
 
 renderBackgroundTasks ()
 
- Protected Attributes inherited from ilMainMenuGUI
 $rbacsystem
 
 $user
 
 $lng
 
 $plugin_admin
 
 $tree
 
 $access
 
 $nav_history
 
 $settings
 
 $ctrl
 
 $help
 
 $main_tpl
 
 $mode
 
 $topbar_back_url
 
 $topbar_back_caption
 

Detailed Description

Handles display of the main menu for LTI.

Author
Stefan Schneider
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

LTI\ilMainMenuGUI::__construct (   $a_target = "_top",
  $a_use_start_template = false,
  $a_main_tpl = null 
)
Parameters
string$a_targettarget frame
boolean$a_use_start_templatetrue means: target scripts should be called through start template

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

References $DIC, $ilLog, $ilUser, ilMainMenuGUI\$lng, ilMainMenuGUI\$rbacsystem, $url, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupType(), array, ilMemberViewSettings\getInstance(), Monolog\Handler\mail(), ilMainMenuGUI\setMode(), settings(), and user().

42  {
43  global $ilias, $rbacsystem, $ilUser, $ilLog, $DIC, $lng;
44 
45  if ($a_main_tpl != null) {
46  $this->main_tpl = $a_main_tpl;
47  } else {
48  $this->main_tpl = $DIC["tpl"];
49  }
50 
51  $this->rbacsystem = $DIC->rbac()->system();
52  $this->user = $DIC->user();
53  $this->lng = $DIC->language();
54  $this->plugin_admin = $DIC["ilPluginAdmin"];
55  $this->tree = $DIC->repositoryTree();
56  $this->access = $DIC->access();
57  $this->nav_history = $DIC["ilNavigationHistory"];
58  $this->settings = $DIC->settings();
59  $this->ctrl = $DIC->ctrl();
60  $this->help = $DIC["ilHelp"];
61  $this->ui = $DIC->ui();
62  $rbacsystem = $DIC->rbac()->system();
63  $ilUser = $DIC->user();
64 
65  $this->tpl = new ilTemplate(
66  "tpl.main_menu.html",
67  true,
68  true,
69  "Services/LTI"
70  );
71 
72  $this->target = $a_target;
73  $this->start_template = $a_use_start_template;
74 
75  $this->mail = false;
76 
77  $this->setMode(self::MODE_FULL);
78 
79  // member view
80  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
82  if ($set->isActive()) {
83  $ref_id = ilMemberViewSettings::getInstance()->getCurrentRefId();
84 
85  if (!$ref_id) {
86  $DIC["lti"]->member_view = false;
87  $DIC["lti"]->member_view_url = "";
88  return;
89  }
90  include_once './Services/Link/classes/class.ilLink.php';
92  $ref_id,
94  array('mv' => 0)
95  );
96  $DIC["lti"]->member_view = true;
97  $DIC["lti"]->member_view_url = $url;
98  $DIC["lti"]->member_view_close_txt = $lng->txt('mem_view_close');
99  } else {
100  $DIC["lti"]->member_view = false;
101  $DIC["lti"]->member_view_url = "";
102  }
103  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
settings()
Definition: settings.php:2
static getInstance()
Get instance.
$url
+ Here is the call graph for this function:

Member Function Documentation

◆ getSpacerClass()

LTI\ilMainMenuGUI::getSpacerClass ( )

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

107  {
108  return "ilFixedTopSpacerBarOnly";
109  }

◆ log()

LTI\ilMainMenuGUI::log (   $txt)
private

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

References $DIC, and $txt.

149  {
150  global $DIC;
151  $DIC->logger()->lti()->write($txt);
152  }
global $DIC
Definition: saml.php:7
$txt
Definition: error.php:11

◆ setTemplateVars()

LTI\ilMainMenuGUI::setTemplateVars ( )

set all template variables (images, scripts, target frames, ...)

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

References $DIC, $ilSetting, $ilUser, ilMainMenuGUI\$lng, ilMainMenuGUI\$rbacsystem, ilMainMenuGUI\$tree, and ilUtil\getStyleSheetLocation().

115  {
116  global $DIC, $rbacsystem, $lng, $ilias, $tree, $ilUser, $ilSetting, $ilPluginAdmin;
117  //$DIC["lti"]->log("setTemplateVars in ilMainMenu");
118 
119  // append internal and external LTI css just before </body> end-tag
120  $view = $DIC["lti"];
121  if ($this->main_tpl->blockExists('view_append_inline_css')) {
122  $css_html = "";
123  $css = $view->appendInlineCss();
124  foreach ($css as $cssfile) {
125  $css_html .= "<style type=\"text/css\">\n";
126  $css_html .= file_get_contents($cssfile);
127  $css_html .= "</style>\n";
128  }
129  $this->main_tpl->setCurrentBlock("view_append_inline_css");
130  $this->main_tpl->setVariable("APPEND_STYLES", $css_html);
131  $this->main_tpl->parseCurrentBlock();
132  }
133  $view->render($this->tpl, 'top_bar_header');
134  if (!$view->member_view) {
135  $view->render($this->tpl, 'view_nav');
136  $view->render($this->tpl, 'user_logged_in');
137  } else {
138  $this->tpl->setVariable("TOPBAR_CLASS", " ilMemberViewMainHeader");
139  $this->tpl->setVariable("MEMBER_VIEW_INFO", $lng->txt("mem_view_long"));
140  }
141  //$view->checkMessages();
142  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
143  include_once("./Modules/SystemFolder/classes/class.ilObjSystemFolder.php");
144  $this->tpl->setVariable("TXT_MAIN_MENU", $lng->txt("main_menu"));
145  $this->tpl->parseCurrentBlock();
146  }
global $DIC
Definition: saml.php:7
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

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