ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTabsGUI Class Reference

Tabs GUI. More...

+ Collaboration diagram for ilTabsGUI:

Public Member Functions

 ilTabsGUI ()
 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...
 
 addTarget ($a_text, $a_link, $a_cmd="", $a_cmdClass="", $a_frame="", $a_activate=false, $a_dir_text=false)
 DEPRECATED. More...
 
 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
 

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.

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 397 of file class.ilTabsGUI.php.

References $cmd, $ilCtrl, $ilUser, $lng, $target, ilTooltipGUI\addTooltip(), 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().

398  {
399  global $ilCtrl, $lng, $ilUser, $ilPluginAdmin, $ilHelp;
400 
401  // user interface hook [uihk]
402  if (!$this->getSetupMode())
403  {
404  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
405  foreach ($pl_names as $pl)
406  {
407  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
408  $gui_class = $ui_plugin->getUIClassInstance();
409  $resp = $gui_class->modifyGUI("", $a_get_sub_tabs ? "sub_tabs" : "tabs",
410  array("tabs" => $this));
411  }
412  }
413 
414 
415  // user interface hook [uihk]
416  if (!$this->getSetupMode())
417  {
418  $cmd = $ilCtrl->getCmd();
419  $cmdClass = $ilCtrl->getCmdClass();
420  }
421 
422  if ($a_get_sub_tabs)
423  {
424  $tpl = new ilTemplate("tpl.sub_tabs.html", true, true, "Services/UIComponent/Tabs");
425  $pre = "sub";
426  $pre2 = "SUB_";
427  $sr_pre = "sub_";
428  }
429  else
430  {
431  $tpl = new ilTemplate("tpl.tabs.html", true, true, "Services/UIComponent/Tabs");
432  if ($a_after_tabs_anchor)
433  {
434  $tpl->touchBlock("after_tabs");
435  }
436  $pre = $pre2 = "";
437 
438  include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
439 
440  // back 2 tab
441  if ($this->back_2_title != "")
442  {
443  $tpl->setCurrentBlock("back_2_tab");
444  $tpl->setVariable("BACK_2_ICON", ilGlyphGUI::get(ilGlyphGUI::PREVIOUS, ilGlyphGUI::NO_TEXT));
445  $tpl->setVariable("BACK_2_TAB_LINK", $this->back_2_target);
446  $tpl->setVariable("BACK_2_TAB_TEXT", $this->back_2_title);
447  $tpl->setVariable("BACK_2_TAB_TARGET", $this->back_2_frame);
448  $tpl->parseCurrentBlock();
449  }
450 
451  // back tab
452  if ($this->back_title != "")
453  {
454  $tpl->setCurrentBlock("back_tab");
455  $tpl->setVariable("BACK_ICON", ilGlyphGUI::get(ilGlyphGUI::PREVIOUS, ilGlyphGUI::NO_TEXT));
456  $tpl->setVariable("BACK_TAB_LINK", $this->back_target);
457  $tpl->setVariable("BACK_TAB_TEXT", $this->back_title);
458  $tpl->setVariable("BACK_TAB_TARGET", $this->back_frame);
459  $tpl->parseCurrentBlock();
460  }
461  }
462 
463  $targets = $a_get_sub_tabs ? $this->sub_target : $this->target;
464 
465  $i=0;
466 
467  // do not display one tab only
468  if ((count($targets) > 1) || ($this->back_title != "" && !$a_get_sub_tabs)
469  || (count($this->non_tabbed_link) > 0 && !$a_get_sub_tabs))
470  {
471  foreach ($targets as $target)
472  {
473  $i++;
474 
475  if (!is_array($target["cmd"]))
476  {
477  $target["cmd"] = array($target["cmd"]);
478  }
479  if (!$a_manual &&
480  (in_array($cmd, $target["cmd"]) || ($target["cmd"][0] == "" && count($target["cmd"]) == 1)) &&
481  (in_array($cmdClass,$target["cmdClass"]) || !$target["cmdClass"]))
482  {
483  $tabtype = $pre."tabactive";
484  }
485  else
486  {
487  $tabtype = $pre."tabinactive";
488  }
489 
490  if ($a_manual && $target["activate"])
491  {
492  $tabtype = $pre."tabactive";
493  }
494 
495  if ($tabtype == "tabactive" || $tabtype == "subtabactive")
496  {
497  $tpl->setCurrentBlock("sel_text");
498  $tpl->setVariable("TXT_SELECTED", $lng->txt("stat_selected"));
499  $tpl->parseCurrentBlock();
500 
501  if (!$this->getSetupMode())
502  {
503  if ($a_get_sub_tabs)
504  {
506  }
507  else
508  {
510  }
511  $ilHelp->setDefaultScreenId($part, $target["id"]);
512  }
513  }
514 
515  $tpl->setCurrentBlock($pre."tab");
516  $tpl->setVariable("ID", $pre."tab_".$target["id"]);
517 
518  // tooltip
519  if (!$this->getSetupMode())
520  {
521  $ttext = $ilHelp->getTabTooltipText($target["id"]);
522  if ($ttext != "")
523  {
524  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
525  ilTooltipGUI::addTooltip($pre."tab_".$target["id"], $ttext, "",
526  "bottom center", "top center", false);
527  }
528  }
529 
530  // bs-patch: start
531  $tabtype = in_array($tabtype, array("tabactive", "subtabactive"))
532  ? "active"
533  : "";
534  // bs-patch: end
535 
536  $tpl->setVariable($pre2."TAB_TYPE", $tabtype);
537  if (!$this->getSetupMode())
538  {
539  $hash = ($ilUser->getPref("screen_reader_optimization"))
540  ? "#after_".$sr_pre."tabs"
541  : "";
542  }
543 
544  $tpl->setVariable($pre2."TAB_LINK", $target["link"].$hash);
545  if ($target["dir_text"])
546  {
547  $tpl->setVariable($pre2."TAB_TEXT", $target["text"]);
548  }
549  else
550  {
551  $tpl->setVariable($pre2."TAB_TEXT", $lng->txt($target["text"]));
552  }
553  $tpl->setVariable($pre2."TAB_TARGET", $target["frame"]);
554  $tpl->parseCurrentBlock();
555  }
556 
557  if ($a_get_sub_tabs)
558  {
559  $tpl->setVariable("TXT_SUBTABS", $lng->txt("subtabs"));
560  }
561  else
562  {
563  $tpl->setVariable("TXT_TABS", $lng->txt("tabs"));
564 
565  // non tabbed links
566  include_once("./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
567  foreach ($this->non_tabbed_link as $link)
568  {
569  $tpl->setCurrentBlock("tab");
570  $tpl->setVariable("TAB_TYPE", "nontabbed");
571  $tpl->setVariable("TAB_ICON", " ".ilGlyphGUI::get(ilGlyphGUI::NEXT, ilGlyphGUI::NO_TEXT));
572  $tpl->setVariable("TAB_TEXT", $link["text"]);
573  $tpl->setVariable("TAB_LINK", $link["link"]);
574  $tpl->setVariable("TAB_TARGET", $link["frame"]);
575  $tpl->setVariable("ID", "nontab_".$link["id"]);
576  $tpl->parseCurrentBlock();
577 
578  // tooltip
579  if (!$this->getSetupMode())
580  {
581  $ttext = $ilHelp->getTabTooltipText($link["id"]);
582  if ($ttext != "")
583  {
584  include_once("./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
585  ilTooltipGUI::addTooltip("nontab_".$link["id"], $ttext, "",
586  "bottom center", "top center", false);
587  }
588  }
589  }
590  }
591 
592  return $tpl->get();
593  }
594  else
595  {
596  return "";
597  }
598  }
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
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
global $ilUser
Definition: imgupload.php:15
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 345 of file class.ilTabsGUI.php.

References setSubTabActive().

346  {
347  $this->setSubTabActive($a_id);
348  }
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 314 of file class.ilTabsGUI.php.

References setTabActive().

315  {
316  $this->setTabActive($a_id);
317  }
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 385 of file class.ilTabsGUI.php.

386  {
387  $this->non_tabbed_link[] = array("text" => $a_text, "link" => $a_link,
388  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
389  }

◆ 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 276 of file class.ilTabsGUI.php.

277  {
278  $this->sub_target[] = array("text" => $a_text, "link" => $a_link,
279  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
280  }

◆ 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 248 of file class.ilTabsGUI.php.

Referenced by ilObjQuestionPoolGUI\addSettingsSubTabs().

250  {
251 
252  if(!$a_cmdClass)
253  {
254  $a_cmdClass = array();
255  }
256  $a_cmdClass = !is_array($a_cmdClass) ? array(strtolower($a_cmdClass)) : $a_cmdClass;
257  #$a_cmdClass = strtolower($a_cmdClass);
258 
259  if ($a_activate)
260  {
261  $this->subtab_manual_activation = true;
262  }
263  $this->sub_target[] = array("text" => $a_text, "link" => $a_link,
264  "cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame,
265  "activate" => $a_activate, "dir_text" => $a_dir_text, "id" => $a_text);
266  }
+ 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 131 of file class.ilTabsGUI.php.

Referenced by ilTestToplistGUI\manageTabs().

132  {
133  $this->target[] = array("text" => $a_text, "link" => $a_link,
134  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
135  }
+ 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.

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 104 of file class.ilTabsGUI.php.

Referenced by assQuestionGUI\addTab_QuestionFeedback(), assQuestionGUI\addTab_QuestionHints(), assQuestionGUI\addTab_QuestionPreview(), assQuestionGUI\addTab_SuggestedSolution(), ilObjForumGUI\afterSave(), ilObjSystemCheckGUI\executeCommand(), ilObjTermsOfServiceGUI\executeCommand(), and ilChatroomObjectGUI\switchToVisibleMode().

106  {
107  if(!$a_cmdClass)
108  {
109  $a_cmdClass = array();
110  }
111  $a_cmdClass = !is_array($a_cmdClass) ? array(strtolower($a_cmdClass)) : $a_cmdClass;
112  #$a_cmdClass = strtolower($a_cmdClass);
113 
114  if ($a_activate)
115  {
116  $this->manual_activation = true;
117  }
118  $this->target[] = array("text" => $a_text, "link" => $a_link,
119  "cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame,
120  "activate" => $a_activate, "dir_text" => $a_dir_text, "id" => $a_text);
121  }
+ Here is the caller graph for this function:

◆ clearSubTabs()

ilTabsGUI::clearSubTabs ( )

Clear all already added sub tabs.

Parameters
boolean

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

356  {
357  $this->sub_target = array();
358  return true;
359  }

◆ clearTargets()

ilTabsGUI::clearTargets ( )

clear all targets

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

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

Referenced by ilTestToplistGUI\manageTabs().

211  {
212  global $ilHelp;
213 
214  if (!$this->getSetupMode())
215  {
216  $ilHelp->setScreenIdComponent("");
217  }
218 
219  $this->target = array();
220  $this->sub_target = array();
221  $this->non_tabbed_link = array();
222  $this->back_title = "";
223  $this->back_target = "";
224  $this->back_2_target = "";
225  $this->back_2_title = "";
226  $this->setTabActive("");
227  $this->setSubTabActive("");
228  }
getSetupMode()
Get setup mode.
setTabActive($a_id)
DEPRECATED.
setSubTabActive($a_text)
DEPRECATED.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveTab()

ilTabsGUI::getActiveTab ( )

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

600  {
601  foreach($this->target as $i => $target){
602  if($this->target[$i]['activate'])
603  return $this->target[$i]['id'];
604  }
605  }

◆ getHTML()

ilTabsGUI::getHTML (   $a_after_tabs_anchor = false)

get tabs code as html

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

References __getHTML().

365  {
366  return $this->__getHTML(false,$this->manual_activation, $a_after_tabs_anchor);
367  }
__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 61 of file class.ilTabsGUI.php.

References $setup_mode.

Referenced by __getHTML(), and clearTargets().

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

◆ getSubTabHTML()

ilTabsGUI::getSubTabHTML ( )

get sub tabs code as html

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

References __getHTML().

373  {
374  return $this->__getHTML(true,$this->subtab_manual_activation);
375  }
__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 607 of file class.ilTabsGUI.php.

References $target.

608  {
609  return (bool)sizeof($this->target);
610  }

◆ ilTabsGUI()

ilTabsGUI::ilTabsGUI ( )

Constructor public.

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

References $lng, $objDefinition, and $tpl.

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

◆ 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 164 of file class.ilTabsGUI.php.

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

◆ 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 144 of file class.ilTabsGUI.php.

145  {
146  foreach($this->target as $key => $target)
147  {
148  if($target['id'] == $a_id)
149  {
150  unset($this->target[$key]);
151  return true;
152  }
153  }
154  return false;
155  }

◆ 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 187 of file class.ilTabsGUI.php.

188  {
189  for($i = 0; $i < count($this->target); $i++)
190  {
191  if($this->target[$i]['id'] == $a_old_id)
192  {
193  $this->target[$i] = array();
194  $this->target[$i] = array(
195  "text" => $a_text,
196  "link" => $a_link,
197  "frame" => $a_frame,
198  "dir_text" => true,
199  "id" => $a_new_id,
200  "cmdClass" => array());
201  return true;
202  }
203  }
204  return false;
205  }

◆ setBack2Target()

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

back target for tow level upper context

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

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

◆ setBackTarget()

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

back target for upper context

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

Referenced by assQuestionGUI\addBackTab(), ilTestToplistGUI\manageTabs(), and ilChatroomObjectGUI\switchToVisibleMode().

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

◆ setSetupMode()

ilTabsGUI::setSetupMode (   $a_val)

Set setup mode.

Parameters
boolean$a_valsetup mode

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

52  {
53  $this->setup_mode = $a_val;
54  }

◆ 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 330 of file class.ilTabsGUI.php.

Referenced by activateSubTab(), and clearTargets().

331  {
332  for($i = 0; $i < count($this->sub_target);$i++)
333  {
334  $this->sub_target[$i]['activate'] = $this->sub_target[$i]['id'] == $a_text;
335  }
336  $this->subtab_manual_activation = true;
337  return true;
338  }
+ Here is the caller graph for this function:

◆ setTabActive()

ilTabsGUI::setTabActive (   $a_id)

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

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

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

293  {
294  foreach($this->target as $key => $target)
295  {
296  $this->target[$key]['activate'] = $this->target[$key]['id'] == $a_id;
297  }
298  if ($a_id != "")
299  {
300  $this->manual_activation = true;
301  }
302  else
303  {
304  $this->manual_activation = false;
305  }
306  return true;
307  }
+ Here is the caller graph for this function:

Field Documentation

◆ $lng

ilTabsGUI::$lng

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

Referenced by __getHTML(), and ilTabsGUI().

◆ $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 ilTabsGUI().

◆ $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 ilTabsGUI().


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