ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTabsGUI Class Reference

Tabs GUI. More...

+ Collaboration diagram for ilTabsGUI:

Public Member Functions

 __construct ()
 Constructor public. More...
 
 setSetupMode ($a_val)
 Set setup mode. More...
 
 getSetupMode ()
 Get setup mode. More...
 
 setBackTarget ($a_title, $a_target, $a_frame="")
 back target for upper context More...
 
 setBack2Target ($a_title, $a_target, $a_frame="")
 back target for tow level upper context More...
 
 setForcePresentationOfSingleTab ($a_val)
 Set force presentation of single tab. More...
 
 getForcePresentationOfSingleTab ()
 Get force presentation of single tab. More...
 
 addTarget ($a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
 
 addTab ($a_id, $a_text, $a_link, $a_frame="")
 Add a Tab. More...
 
 removeTab ($a_id)
 Remove a tab identified by its id. More...
 
 removeSubTab ($a_id)
 Remove a tab identified by its id. More...
 
 replaceTab ($a_old_id, $a_new_id, $a_text, $a_link, $a_frame='')
 Replace a tab. More...
 
 clearTargets ()
 clear all targets More...
 
 addSubTabTarget ($a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
 DEPRECATED. More...
 
 addSubTab ($a_id, $a_text, $a_link, $a_frame="")
 Add a Subtab. More...
 
 setTabActive ($a_id)
 DEPRECATED. More...
 
 activateTab ($a_id)
 Activate a specific tab identified its id. More...
 
 setSubTabActive ($a_text)
 DEPRECATED. More...
 
 activateSubTab ($a_id)
 Activate a specific subtab identified its id. More...
 
 clearSubTabs ()
 Clear all already added sub tabs. More...
 
 getHTML ($a_after_tabs_anchor=false)
 get tabs code as html More...
 
 getSubTabHTML ()
 get sub tabs code as html More...
 
 addNonTabbedLink ($a_id, $a_text, $a_link, $a_frame="")
 Add a non-tabbed link (outside of tabs at same level) More...
 
 __getHTML ($a_get_sub_tabs, $a_manual, $a_after_tabs_anchor=false)
 get tabs code as html More...
 
 getActiveTab ()
 
 hasTabs ()
 

Data Fields

 $target_script
 
 $obj_type
 
 $tpl
 
 $lng
 
 $tabs
 
 $objDefinition
 
 $target = array()
 
 $sub_target = array()
 
 $non_tabbed_link = array()
 
 $setup_mode = false
 

Protected Attributes

 $force_one_tab = false
 

Detailed Description

Tabs GUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilTabsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTabsGUI::__construct ( )

Constructor public.

Definition at line 31 of file class.ilTabsGUI.php.

References $lng, $objDefinition, and $tpl.

32  {
33  global $tpl, $objDefinition, $lng;
34 
35  $this->tpl = $tpl;
36  $this->lng = $lng;
37  $this->objDefinition = $objDefinition;
38  $this->manual_activation = false;
39  $this->subtab_manual_activation = false;
40  $this->temp_var = "TABS";
41  $this->sub_tabs = false;
42  $this->back_title = "";
43  $this->back_target = "";
44  $this->back_2_target = "";
45  $this->back_2_title = "";
46  }

Member Function Documentation

◆ __getHTML()

ilTabsGUI::__getHTML (   $a_get_sub_tabs,
  $a_manual,
  $a_after_tabs_anchor = false 
)

get tabs code as html

Parameters
boolchoose tabs or sub tabs
boolmanual activation Private

Definition at line 419 of file class.ilTabsGUI.php.

References $cmd, $ilCtrl, $ilUser, $lng, $target, ilTooltipGUI\addTooltip(), array, ilGlyphGUI\get(), ilPluginAdmin\getPluginObject(), getSetupMode(), ilHelpGUI\ID_PART_SCREEN, ilHelpGUI\ID_PART_SUB_SCREEN, IL_COMP_SERVICE, ilGlyphGUI\NEXT, ilGlyphGUI\NO_TEXT, and ilGlyphGUI\PREVIOUS.

Referenced by getHTML(), and getSubTabHTML().

420  {
421  global $ilCtrl, $lng, $ilUser, $ilPluginAdmin, $ilHelp;
422 
423  // user interface hook [uihk]
424  if (!$this->getSetupMode())
425  {
426  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
427  foreach ($pl_names as $pl)
428  {
429  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
430  $gui_class = $ui_plugin->getUIClassInstance();
431  $resp = $gui_class->modifyGUI("", $a_get_sub_tabs ? "sub_tabs" : "tabs",
432  array("tabs" => $this));
433  }
434  }
435 
436 
437  // user interface hook [uihk]
438  if (!$this->getSetupMode())
439  {
440  $cmd = $ilCtrl->getCmd();
441  $cmdClass = $ilCtrl->getCmdClass();
442  }
443 
444  if ($a_get_sub_tabs)
445  {
446  $tpl = new ilTemplate("tpl.sub_tabs.html", true, true, "Services/UIComponent/Tabs");
447  $pre = "sub";
448  $pre2 = "SUB_";
449  $sr_pre = "sub_";
450  }
451  else
452  {
453  $tpl = new ilTemplate("tpl.tabs.html", true, true, "Services/UIComponent/Tabs");
454  if ($a_after_tabs_anchor)
455  {
456  $tpl->touchBlock("after_tabs");
457  }
458  $pre = $pre2 = "";
459 
460  include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
461 
462  // back 2 tab
463  if ($this->back_2_title != "")
464  {
465  $tpl->setCurrentBlock("back_2_tab");
466  $tpl->setVariable("BACK_2_ICON", ilGlyphGUI::get(ilGlyphGUI::PREVIOUS, ilGlyphGUI::NO_TEXT));
467  $tpl->setVariable("BACK_2_TAB_LINK", $this->back_2_target);
468  $tpl->setVariable("BACK_2_TAB_TEXT", $this->back_2_title);
469  $tpl->setVariable("BACK_2_TAB_TARGET", $this->back_2_frame);
470  $tpl->parseCurrentBlock();
471  }
472 
473  // back tab
474  if ($this->back_title != "")
475  {
476  $tpl->setCurrentBlock("back_tab");
477  $tpl->setVariable("BACK_ICON", ilGlyphGUI::get(ilGlyphGUI::PREVIOUS, ilGlyphGUI::NO_TEXT));
478  $tpl->setVariable("BACK_TAB_LINK", $this->back_target);
479  $tpl->setVariable("BACK_TAB_TEXT", $this->back_title);
480  $tpl->setVariable("BACK_TAB_TARGET", $this->back_frame);
481  $tpl->parseCurrentBlock();
482  }
483  }
484 
485  $targets = $a_get_sub_tabs ? $this->sub_target : $this->target;
486 
487  $i=0;
488 
489  // do not display one tab only
490  if ((count($targets) > 1 || $this->force_one_tab) || ($this->back_title != "" && !$a_get_sub_tabs)
491  || (count($this->non_tabbed_link) > 0 && !$a_get_sub_tabs))
492  {
493  foreach ($targets as $target)
494  {
495  $i++;
496 
497  if (!is_array($target["cmd"]))
498  {
499  $target["cmd"] = array($target["cmd"]);
500  }
501  if (!$a_manual &&
502  (in_array($cmd, $target["cmd"]) || ($target["cmd"][0] == "" && count($target["cmd"]) == 1)) &&
503  (in_array($cmdClass,$target["cmdClass"]) || !$target["cmdClass"]))
504  {
505  $tabtype = $pre."tabactive";
506  }
507  else
508  {
509  $tabtype = $pre."tabinactive";
510  }
511 
512  if ($a_manual && $target["activate"])
513  {
514  $tabtype = $pre."tabactive";
515  }
516 
517  if ($tabtype == "tabactive" || $tabtype == "subtabactive")
518  {
519  $tpl->setCurrentBlock("sel_text");
520  $tpl->setVariable("TXT_SELECTED", $lng->txt("stat_selected"));
521  $tpl->parseCurrentBlock();
522 
523  if (!$this->getSetupMode())
524  {
525  if ($a_get_sub_tabs)
526  {
528  }
529  else
530  {
532  }
533  $ilHelp->setDefaultScreenId($part, $target["id"]);
534  }
535  }
536 
537  $tpl->setCurrentBlock($pre."tab");
538  $tpl->setVariable("ID", $pre."tab_".$target["id"]);
539 
540  // tooltip
541  if (!$this->getSetupMode())
542  {
543  $ttext = $ilHelp->getTabTooltipText($target["id"]);
544  if ($ttext != "")
545  {
546  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
547  ilTooltipGUI::addTooltip($pre."tab_".$target["id"], $ttext, "",
548  "bottom center", "top center", false);
549  }
550  }
551 
552  // bs-patch: start
553  $tabtype = in_array($tabtype, array("tabactive", "subtabactive"))
554  ? "active"
555  : "";
556  // bs-patch: end
557 
558  $tpl->setVariable($pre2."TAB_TYPE", $tabtype);
559  if (!$this->getSetupMode())
560  {
561  $hash = ($ilUser->getPref("screen_reader_optimization"))
562  ? "#after_".$sr_pre."tabs"
563  : "";
564  }
565 
566  $tpl->setVariable($pre2."TAB_LINK", $target["link"].$hash);
567  if ($target["dir_text"])
568  {
569  $tpl->setVariable($pre2."TAB_TEXT", $target["text"]);
570  }
571  else
572  {
573  $tpl->setVariable($pre2."TAB_TEXT", $lng->txt($target["text"]));
574  }
575  $tpl->setVariable($pre2."TAB_TARGET", $target["frame"]);
576  $tpl->parseCurrentBlock();
577  }
578 
579  if ($a_get_sub_tabs)
580  {
581  $tpl->setVariable("TXT_SUBTABS", $lng->txt("subtabs"));
582  }
583  else
584  {
585  $tpl->setVariable("TXT_TABS", $lng->txt("tabs"));
586 
587  // non tabbed links
588  include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
589  foreach ($this->non_tabbed_link as $link)
590  {
591  $tpl->setCurrentBlock("tab");
592  $tpl->setVariable("TAB_TYPE", "nontabbed");
593  $tpl->setVariable("TAB_ICON", " ".ilGlyphGUI::get(ilGlyphGUI::NEXT, ilGlyphGUI::NO_TEXT));
594  $tpl->setVariable("TAB_TEXT", $link["text"]);
595  $tpl->setVariable("TAB_LINK", $link["link"]);
596  $tpl->setVariable("TAB_TARGET", $link["frame"]);
597  $tpl->setVariable("ID", "nontab_".$link["id"]);
598  $tpl->parseCurrentBlock();
599 
600  // tooltip
601  if (!$this->getSetupMode())
602  {
603  $ttext = $ilHelp->getTabTooltipText($link["id"]);
604  if ($ttext != "")
605  {
606  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
607  ilTooltipGUI::addTooltip("nontab_".$link["id"], $ttext, "",
608  "bottom center", "top center", false);
609  }
610  }
611  }
612  }
613 
614  return $tpl->get();
615  }
616  else
617  {
618  return "";
619  }
620  }
getSetupMode()
Get setup mode.
$cmd
Definition: sahs_server.php:35
static get($a_glyph, $a_text="")
Get glyph html.
const ID_PART_SUB_SCREEN
global $ilCtrl
Definition: ilias.php:18
static addTooltip($a_el_id, $a_text, $a_container="", $a_my="bottom center", $a_at="top center", $a_use_htmlspecialchars=true)
Adds a tooltip to an HTML element.
special template class to simplify handling of ITX/PEAR
$ilUser
Definition: imgupload.php:18
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
Create styles array
The data for the language used.
const ID_PART_SCREEN
const IL_COMP_SERVICE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ activateSubTab()

ilTabsGUI::activateSubTab (   $a_id)

Activate a specific subtab identified its id.

Parameters
string$a_textmenu item text

Definition at line 367 of file class.ilTabsGUI.php.

References setSubTabActive().

368  {
369  $this->setSubTabActive($a_id);
370  }
setSubTabActive($a_text)
DEPRECATED.
+ Here is the call graph for this function:

◆ activateTab()

ilTabsGUI::activateTab (   $a_id)

Activate a specific tab identified its id.

Parameters
string$a_textmenu item text

Definition at line 336 of file class.ilTabsGUI.php.

References setTabActive().

337  {
338  $this->setTabActive($a_id);
339  }
setTabActive($a_id)
DEPRECATED.
+ Here is the call graph for this function:

◆ addNonTabbedLink()

ilTabsGUI::addNonTabbedLink (   $a_id,
  $a_text,
  $a_link,
  $a_frame = "" 
)

Add a non-tabbed link (outside of tabs at same level)

Parameters
stringid
stringtext (no lang var!)
stringlink
stringframe target

Definition at line 407 of file class.ilTabsGUI.php.

References array.

408  {
409  $this->non_tabbed_link[] = array("text" => $a_text, "link" => $a_link,
410  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
411  }
Create styles array
The data for the language used.

◆ addSubTab()

ilTabsGUI::addSubTab (   $a_id,
  $a_text,
  $a_link,
  $a_frame = "" 
)

Add a Subtab.

Parameters
stringid
stringtext (no lang var!)
stringlink
stringframe target

Definition at line 297 of file class.ilTabsGUI.php.

References array.

Referenced by ilChatroomTabGUIFactory\convertLowerCamelCaseToUnderscoreCaseConversion(), and ilIndividualAssessmentSettingsGUI\getSubTabs().

298  {
299  $this->sub_target[] = array("text" => $a_text, "link" => $a_link,
300  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
301  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addSubTabTarget()

ilTabsGUI::addSubTabTarget (   $a_text,
  $a_link,
  $a_cmd = "",
  $a_cmdClass = "",
  $a_frame = "",
  $a_activate = false,
  $a_dir_text = false 
)

DEPRECATED.

Use addTab/addSubTab and activateTab/activateSubTab.

Add a Subtarget to the tabbed menu. If no target has set $a_activate to true, ILIAS tries to determine the current activated menu item automatically using $a_cmd and $a_cmdClass. If one item is set activated (and only one should be activated) the automatism is disabled.

Parameters
string$a_textmenu item text
string$a_linkmenu item link
string$a_cmdcommand, used for auto activation
string$a_cmdClassused for auto activation. String or array of cmd classes
string$a_frameframe target
boolean$a_activateactivate this menu item
boolean$a_dir_texttext is direct text, no language variable

Definition at line 269 of file class.ilTabsGUI.php.

References array.

Referenced by ilObjQuestionPoolGUI\addSettingsSubTabs(), and ilMembershipGUI\setSubTabs().

271  {
272 
273  if(!$a_cmdClass)
274  {
275  $a_cmdClass = array();
276  }
277  $a_cmdClass = !is_array($a_cmdClass) ? array(strtolower($a_cmdClass)) : $a_cmdClass;
278  #$a_cmdClass = strtolower($a_cmdClass);
279 
280  if ($a_activate)
281  {
282  $this->subtab_manual_activation = true;
283  }
284  $this->sub_target[] = array("text" => $a_text, "link" => $a_link,
285  "cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame,
286  "activate" => $a_activate, "dir_text" => $a_dir_text, "id" => $a_text);
287  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addTab()

ilTabsGUI::addTab (   $a_id,
  $a_text,
  $a_link,
  $a_frame = "" 
)

Add a Tab.

Parameters
stringid
stringtext (no lang var!)
stringlink
stringframe target

Definition at line 152 of file class.ilTabsGUI.php.

References array.

Referenced by ilMembershipGUI\addMemberTab(), ilChatroomTabGUIFactory\convertLowerCamelCaseToUnderscoreCaseConversion(), and ilTestToplistGUI\manageTabs().

153  {
154  $this->target[] = array("text" => $a_text, "link" => $a_link,
155  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
156  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addTarget()

ilTabsGUI::addTarget (   $a_text,
  $a_link,
  $a_cmd = "",
  $a_cmdClass = "",
  $a_frame = "",
  $a_activate = false,
  $a_dir_text = false 
)
Deprecated:
since version 5.0

Use addTab/addSubTab and activateTab/activateSubTab.

Add a target to the tabbed menu. If no target has set $a_activate to true, ILIAS tries to determine the current activated menu item automatically using $a_cmd and $a_cmdClass. If one item is set activated (and only one should be activated) the automatism is disabled.

Parameters
string$a_textmenu item text
string$a_linkmenu item link
string$a_cmdcommand, used for auto activation
string$a_cmdClassused for auto activation. String or array of cmd classes
string$a_frameframe target
boolean$a_activateactivate this menu item

Definition at line 125 of file class.ilTabsGUI.php.

References array.

Referenced by assQuestionGUI\addTab_QuestionFeedback(), assQuestionGUI\addTab_QuestionHints(), assQuestionGUI\addTab_QuestionPreview(), and assQuestionGUI\addTab_SuggestedSolution().

127  {
128  if(!$a_cmdClass)
129  {
130  $a_cmdClass = array();
131  }
132  $a_cmdClass = !is_array($a_cmdClass) ? array(strtolower($a_cmdClass)) : $a_cmdClass;
133  #$a_cmdClass = strtolower($a_cmdClass);
134 
135  if ($a_activate)
136  {
137  $this->manual_activation = true;
138  }
139  $this->target[] = array("text" => $a_text, "link" => $a_link,
140  "cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame,
141  "activate" => $a_activate, "dir_text" => $a_dir_text, "id" => $a_text);
142  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ clearSubTabs()

ilTabsGUI::clearSubTabs ( )

Clear all already added sub tabs.

Parameters
boolean

Definition at line 377 of file class.ilTabsGUI.php.

References array.

378  {
379  $this->sub_target = array();
380  return true;
381  }
Create styles array
The data for the language used.

◆ clearTargets()

ilTabsGUI::clearTargets ( )

clear all targets

Definition at line 231 of file class.ilTabsGUI.php.

References array, getSetupMode(), setSubTabActive(), and setTabActive().

Referenced by ilTestToplistGUI\manageTabs(), and ilIndividualAssessmentMemberGUI\setTabs().

232  {
233  global $ilHelp;
234 
235  if (!$this->getSetupMode())
236  {
237  $ilHelp->setScreenIdComponent("");
238  }
239 
240  $this->target = array();
241  $this->sub_target = array();
242  $this->non_tabbed_link = array();
243  $this->back_title = "";
244  $this->back_target = "";
245  $this->back_2_target = "";
246  $this->back_2_title = "";
247  $this->setTabActive("");
248  $this->setSubTabActive("");
249  }
getSetupMode()
Get setup mode.
setTabActive($a_id)
DEPRECATED.
setSubTabActive($a_text)
DEPRECATED.
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveTab()

ilTabsGUI::getActiveTab ( )

Definition at line 622 of file class.ilTabsGUI.php.

622  {
623  foreach($this->target as $i => $target){
624  if($this->target[$i]['activate'])
625  return $this->target[$i]['id'];
626  }
627  }

◆ getForcePresentationOfSingleTab()

ilTabsGUI::getForcePresentationOfSingleTab ( )

Get force presentation of single tab.

Returns
bool force presentation of single tab

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

References $force_one_tab.

104  {
105  return $this->force_one_tab;
106  }

◆ getHTML()

ilTabsGUI::getHTML (   $a_after_tabs_anchor = false)

get tabs code as html

Definition at line 386 of file class.ilTabsGUI.php.

References __getHTML().

387  {
388  return $this->__getHTML(false,$this->manual_activation, $a_after_tabs_anchor);
389  }
__getHTML($a_get_sub_tabs, $a_manual, $a_after_tabs_anchor=false)
get tabs code as html
+ Here is the call graph for this function:

◆ getSetupMode()

ilTabsGUI::getSetupMode ( )

Get setup mode.

Returns
boolean setup mode

Definition at line 63 of file class.ilTabsGUI.php.

References $setup_mode.

Referenced by __getHTML(), and clearTargets().

64  {
65  return $this->setup_mode;
66  }
+ Here is the caller graph for this function:

◆ getSubTabHTML()

ilTabsGUI::getSubTabHTML ( )

get sub tabs code as html

Definition at line 394 of file class.ilTabsGUI.php.

References __getHTML().

395  {
396  return $this->__getHTML(true,$this->subtab_manual_activation);
397  }
__getHTML($a_get_sub_tabs, $a_manual, $a_after_tabs_anchor=false)
get tabs code as html
+ Here is the call graph for this function:

◆ hasTabs()

ilTabsGUI::hasTabs ( )

Definition at line 629 of file class.ilTabsGUI.php.

References $target.

630  {
631  return (bool)sizeof($this->target);
632  }

◆ removeSubTab()

ilTabsGUI::removeSubTab (   $a_id)

Remove a tab identified by its id.

Parameters
string$a_idId of tab to remove
Returns
bool false if tab wasn't found public

Definition at line 185 of file class.ilTabsGUI.php.

186  {
187  foreach($this->sub_target as $i => $sub_target){
188  if($this->sub_target[$i]['id'] == $a_id)
189  {
190  unset($this->sub_target[$i]);
191  return true;
192  }
193  }
194  return false;
195  }

◆ removeTab()

ilTabsGUI::removeTab (   $a_id)

Remove a tab identified by its id.

Parameters
string$a_idId of tab to remove
Returns
bool false if tab wasn't found public

Definition at line 165 of file class.ilTabsGUI.php.

166  {
167  foreach($this->target as $key => $target)
168  {
169  if($target['id'] == $a_id)
170  {
171  unset($this->target[$key]);
172  return true;
173  }
174  }
175  return false;
176  }

◆ replaceTab()

ilTabsGUI::replaceTab (   $a_old_id,
  $a_new_id,
  $a_text,
  $a_link,
  $a_frame = '' 
)

Replace a tab.

In contrast to a combination of removeTab and addTab, the position is kept.

Parameters
string$a_old_idold id of tab
string$a_new_idnew id if tab
string$a_texttab text
string$a_linktab link
string$a_frame,[optional]frame
Returns
bool

Definition at line 208 of file class.ilTabsGUI.php.

References array.

209  {
210  for($i = 0; $i < count($this->target); $i++)
211  {
212  if($this->target[$i]['id'] == $a_old_id)
213  {
214  $this->target[$i] = array();
215  $this->target[$i] = array(
216  "text" => $a_text,
217  "link" => $a_link,
218  "frame" => $a_frame,
219  "dir_text" => true,
220  "id" => $a_new_id,
221  "cmdClass" => array());
222  return true;
223  }
224  }
225  return false;
226  }
Create styles array
The data for the language used.

◆ setBack2Target()

ilTabsGUI::setBack2Target (   $a_title,
  $a_target,
  $a_frame = "" 
)

back target for tow level upper context

Definition at line 81 of file class.ilTabsGUI.php.

82  {
83  $this->back_2_title = $a_title;
84  $this->back_2_target = $a_target;
85  $this->back_2_frame = $a_frame;
86  }

◆ setBackTarget()

ilTabsGUI::setBackTarget (   $a_title,
  $a_target,
  $a_frame = "" 
)

back target for upper context

Definition at line 71 of file class.ilTabsGUI.php.

Referenced by assQuestionGUI\addBackTab(), ilTestToplistGUI\manageTabs(), and ilIndividualAssessmentMemberGUI\setTabs().

72  {
73  $this->back_title = $a_title;
74  $this->back_target = $a_target;
75  $this->back_frame = $a_frame;
76  }
+ Here is the caller graph for this function:

◆ setForcePresentationOfSingleTab()

ilTabsGUI::setForcePresentationOfSingleTab (   $a_val)

Set force presentation of single tab.

Parameters
bool$a_valforce presentation of single tab

Definition at line 93 of file class.ilTabsGUI.php.

94  {
95  $this->force_one_tab = $a_val;
96  }

◆ setSetupMode()

ilTabsGUI::setSetupMode (   $a_val)

Set setup mode.

Parameters
boolean$a_valsetup mode

Definition at line 53 of file class.ilTabsGUI.php.

54  {
55  $this->setup_mode = $a_val;
56  }

◆ setSubTabActive()

ilTabsGUI::setSubTabActive (   $a_text)

DEPRECATED.

Use addTab/addSubTab and activateTab/activateSubTab.

Activate a specific tab identified by name This method overrides the definition in YOUR_OBJECT::getTabs() and deactivates all other tabs.

Parameters
string$a_textmenu item text
boolean

Definition at line 352 of file class.ilTabsGUI.php.

Referenced by activateSubTab(), and clearTargets().

353  {
354  for($i = 0; $i < count($this->sub_target);$i++)
355  {
356  $this->sub_target[$i]['activate'] = $this->sub_target[$i]['id'] == $a_text;
357  }
358  $this->subtab_manual_activation = true;
359  return true;
360  }
+ Here is the caller graph for this function:

◆ setTabActive()

ilTabsGUI::setTabActive (   $a_id)

DEPRECATED.

Deprecated:
since version 5.2

Use addTab/addSubTab and activateTab/activateSubTab.

Activate a specific tab identified by name This method overrides the definition in YOUR_OBJECT::getTabs() and deactivates all other tabs.

Parameters
string$a_textmenu item text

Definition at line 314 of file class.ilTabsGUI.php.

Referenced by activateTab(), clearTargets(), and ilTestToplistGUI\manageTabs().

315  {
316  foreach($this->target as $key => $target)
317  {
318  $this->target[$key]['activate'] = $this->target[$key]['id'] == $a_id;
319  }
320  if ($a_id != "")
321  {
322  $this->manual_activation = true;
323  }
324  else
325  {
326  $this->manual_activation = false;
327  }
328  return true;
329  }
+ Here is the caller graph for this function:

Field Documentation

◆ $force_one_tab

ilTabsGUI::$force_one_tab = false
protected

Definition at line 25 of file class.ilTabsGUI.php.

Referenced by getForcePresentationOfSingleTab().

◆ $lng

ilTabsGUI::$lng

Definition at line 17 of file class.ilTabsGUI.php.

Referenced by __construct(), and __getHTML().

◆ $non_tabbed_link

ilTabsGUI::$non_tabbed_link = array()

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

◆ $obj_type

ilTabsGUI::$obj_type

Definition at line 15 of file class.ilTabsGUI.php.

◆ $objDefinition

ilTabsGUI::$objDefinition

Definition at line 19 of file class.ilTabsGUI.php.

Referenced by __construct().

◆ $setup_mode

ilTabsGUI::$setup_mode = false

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

Referenced by getSetupMode().

◆ $sub_target

ilTabsGUI::$sub_target = array()

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

◆ $tabs

ilTabsGUI::$tabs

Definition at line 18 of file class.ilTabsGUI.php.

◆ $target

ilTabsGUI::$target = array()

Definition at line 20 of file class.ilTabsGUI.php.

Referenced by __getHTML(), and hasTabs().

◆ $target_script

ilTabsGUI::$target_script

Definition at line 14 of file class.ilTabsGUI.php.

◆ $tpl

ilTabsGUI::$tpl

Definition at line 16 of file class.ilTabsGUI.php.

Referenced by __construct().


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