ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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)
 
 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...
 
 getActiveTab ()
 
 hasTabs ()
 

Data Fields

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

Protected Attributes

 $ctrl
 
 $force_one_tab = false
 

Private Member Functions

 __getHTML ($a_get_sub_tabs, $a_after_tabs_anchor=false)
 get tabs code as html More...
 

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

References $DIC, $lng, and $tpl.

37  {
38  global $DIC;
39 
40  $this->ctrl = $DIC->ctrl();
41  $tpl = $DIC["tpl"];
42  $lng = $DIC->language();
43 
44  $this->tpl = $tpl;
45  $this->lng = $lng;
46  $this->manual_activation = false;
47  $this->subtab_manual_activation = false;
48  $this->temp_var = "TABS";
49  $this->sub_tabs = false;
50  $this->back_title = "";
51  $this->back_target = "";
52  $this->back_2_target = "";
53  $this->back_2_title = "";
54  }
$DIC
Definition: xapitoken.php:46

Member Function Documentation

◆ __getHTML()

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

get tabs code as html

Parameters
bool$a_get_sub_tabschoose tabs or sub tabs
bool$a_after_tabs_anchor
Returns
string Private

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

References $ctrl, $DIC, $i, $ilCtrl, $ilUser, $lng, XapiProxy\$resp, $target, $tpl, 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().

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

References setSubTabActive().

377  {
378  $this->setSubTabActive($a_id);
379  }
setSubTabActive($a_text)
+ 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 346 of file class.ilTabsGUI.php.

References setTabActive().

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

421  {
422  $this->non_tabbed_link[] = array("text" => $a_text, "link" => $a_link,
423  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
424  }

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

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

312  {
313  $this->sub_target[] = array("text" => $a_text, "link" => $a_link,
314  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
315  }
+ 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 280 of file class.ilTabsGUI.php.

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

288  {
289  if (!$a_cmdClass) {
290  $a_cmdClass = array();
291  }
292  $a_cmdClass = !is_array($a_cmdClass) ? array(strtolower($a_cmdClass)) : $a_cmdClass;
293  #$a_cmdClass = strtolower($a_cmdClass);
294 
295  if ($a_activate) {
296  $this->subtab_manual_activation = true;
297  }
298  $this->sub_target[] = array("text" => $a_text, "link" => $a_link,
299  "cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame,
300  "activate" => $a_activate, "dir_text" => $a_dir_text, "id" => $a_text);
301  }
+ 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 164 of file class.ilTabsGUI.php.

Referenced by ilMembershipGUI\addMemberTab(), and ilChatroomTabGUIFactory\buildTabs().

165  {
166  $this->target[] = array("text" => $a_text, "link" => $a_link,
167  "frame" => $a_frame, "dir_text" => true, "id" => $a_id, "cmdClass" => array());
168  }
+ 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 133 of file class.ilTabsGUI.php.

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

141  {
142  if (!$a_cmdClass) {
143  $a_cmdClass = array();
144  }
145  $a_cmdClass = !is_array($a_cmdClass) ? array(strtolower($a_cmdClass)) : $a_cmdClass;
146  #$a_cmdClass = strtolower($a_cmdClass);
147 
148  if ($a_activate) {
149  $this->manual_activation = true;
150  }
151  $this->target[] = array("text" => $a_text, "link" => $a_link,
152  "cmd" => $a_cmd, "cmdClass" => $a_cmdClass, "frame" => $a_frame,
153  "activate" => $a_activate, "dir_text" => $a_dir_text, "id" => $a_text);
154  }
+ Here is the caller graph for this function:

◆ clearSubTabs()

ilTabsGUI::clearSubTabs ( )

Clear all already added sub tabs.

Parameters
boolean

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

387  {
388  $this->sub_target = array();
389  return true;
390  }

◆ clearTargets()

ilTabsGUI::clearTargets ( )

clear all targets

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

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

239  {
240  global $DIC;
241 
242  $ilHelp = null;
243  if (isset($DIC["ilHelp"])) {
244  $ilHelp = $DIC["ilHelp"];
245  }
246 
247  if (!$this->getSetupMode()) {
248  $ilHelp->setScreenIdComponent("");
249  }
250 
251  $this->target = array();
252  $this->sub_target = array();
253  $this->non_tabbed_link = array();
254  $this->back_title = "";
255  $this->back_target = "";
256  $this->back_2_target = "";
257  $this->back_2_title = "";
258  $this->setTabActive("");
259  $this->setSubTabActive("");
260  }
getSetupMode()
Get setup mode.
setTabActive($a_id)
DEPRECATED.
setSubTabActive($a_text)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ getActiveTab()

ilTabsGUI::getActiveTab ( )

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

References $i, and $target.

640  {
641  foreach ($this->target as $i => $target) {
642  if ($this->target[$i]['activate']) {
643  return $this->target[$i]['id'];
644  }
645  }
646  }
$i
Definition: metadata.php:24

◆ getForcePresentationOfSingleTab()

ilTabsGUI::getForcePresentationOfSingleTab ( )

Get force presentation of single tab.

Returns
bool force presentation of single tab

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

References $force_one_tab.

112  {
113  return $this->force_one_tab;
114  }

◆ getHTML()

ilTabsGUI::getHTML (   $a_after_tabs_anchor = false)

get tabs code as html

Parameters
bool$a_after_tabs_anchor
Returns
string

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

References __getHTML().

399  {
400  return $this->__getHTML(false, $a_after_tabs_anchor);
401  }
__getHTML($a_get_sub_tabs, $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 71 of file class.ilTabsGUI.php.

References $setup_mode.

Referenced by __getHTML(), and clearTargets().

72  {
73  return $this->setup_mode;
74  }
+ Here is the caller graph for this function:

◆ getSubTabHTML()

ilTabsGUI::getSubTabHTML ( )

get sub tabs code as html

Returns
string

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

References __getHTML().

408  {
409  return $this->__getHTML(true);
410  }
__getHTML($a_get_sub_tabs, $a_after_tabs_anchor=false)
get tabs code as html
+ Here is the call graph for this function:

◆ hasTabs()

ilTabsGUI::hasTabs ( )

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

References $target.

649  {
650  return (bool) sizeof($this->target);
651  }

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

References $i, and $sub_target.

196  {
197  foreach ($this->sub_target as $i => $sub_target) {
198  if ($this->sub_target[$i]['id'] == $a_id) {
199  unset($this->sub_target[$i]);
200  return true;
201  }
202  }
203  return false;
204  }
$i
Definition: metadata.php:24

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

References $target.

178  {
179  foreach ($this->target as $key => $target) {
180  if ($target['id'] == $a_id) {
181  unset($this->target[$key]);
182  return true;
183  }
184  }
185  return false;
186  }

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

References $i.

218  {
219  for ($i = 0; $i < count($this->target); $i++) {
220  if ($this->target[$i]['id'] == $a_old_id) {
221  $this->target[$i] = array();
222  $this->target[$i] = array(
223  "text" => $a_text,
224  "link" => $a_link,
225  "frame" => $a_frame,
226  "dir_text" => true,
227  "id" => $a_new_id,
228  "cmdClass" => array());
229  return true;
230  }
231  }
232  return false;
233  }
$i
Definition: metadata.php:24

◆ setBack2Target()

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

back target for tow level upper context

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

90  {
91  $this->back_2_title = $a_title;
92  $this->back_2_target = $a_target;
93  $this->back_2_frame = $a_frame;
94  }

◆ setBackTarget()

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

back target for upper context

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

Referenced by assQuestionGUI\addBackTab().

80  {
81  $this->back_title = $a_title;
82  $this->back_target = $a_target;
83  $this->back_frame = $a_frame;
84  }
+ 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 101 of file class.ilTabsGUI.php.

102  {
103  $this->force_one_tab = $a_val;
104  }

◆ setSetupMode()

ilTabsGUI::setSetupMode (   $a_val)

Set setup mode.

Parameters
boolean$a_valsetup mode

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

62  {
63  $this->setup_mode = $a_val;
64  }

◆ setSubTabActive()

ilTabsGUI::setSubTabActive (   $a_text)
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
boolean

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

References $i.

Referenced by activateSubTab(), and clearTargets().

363  {
364  for ($i = 0; $i < count($this->sub_target);$i++) {
365  $this->sub_target[$i]['activate'] = $this->sub_target[$i]['id'] == $a_text;
366  }
367  $this->subtab_manual_activation = true;
368  return true;
369  }
$i
Definition: metadata.php:24
+ 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 328 of file class.ilTabsGUI.php.

References $target.

Referenced by activateTab(), and clearTargets().

329  {
330  foreach ($this->target as $key => $target) {
331  $this->target[$key]['activate'] = $this->target[$key]['id'] == $a_id;
332  }
333  if ($a_id != "") {
334  $this->manual_activation = true;
335  } else {
336  $this->manual_activation = false;
337  }
338  return true;
339  }
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilTabsGUI::$ctrl
protected

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

Referenced by __getHTML().

◆ $force_one_tab

ilTabsGUI::$force_one_tab = false
protected

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

Referenced by getForcePresentationOfSingleTab().

◆ $lng

ilTabsGUI::$lng

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

Referenced by __construct(), and __getHTML().

◆ $non_tabbed_link

ilTabsGUI::$non_tabbed_link = array()

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

◆ $obj_type

ilTabsGUI::$obj_type

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

◆ $setup_mode

ilTabsGUI::$setup_mode = false

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

Referenced by getSetupMode().

◆ $sub_target

ilTabsGUI::$sub_target = array()

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

Referenced by removeSubTab().

◆ $tabs

ilTabsGUI::$tabs

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

◆ $target

ilTabsGUI::$target = array()

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

Referenced by __getHTML(), getActiveTab(), hasTabs(), removeTab(), and setTabActive().

◆ $target_script

ilTabsGUI::$target_script

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

◆ $tpl

ilTabsGUI::$tpl

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

Referenced by __construct(), and __getHTML().


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