ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMMTabHandling Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilMMTabHandling:

Public Member Functions

 __construct (int $ref_id)
 ilMMTabHandling constructor. More...
 
 initTabs (?string $tab, ?string $subtab=null, bool $backtab=false, ?string $calling_class="")
 

Protected Attributes

ilCtrl $ctrl
 

Private Attributes

int $ref_id
 
ilRbacSystem $rbacsystem
 
ilTabsGUI $tabs
 
ilLanguage $lng
 
ilHelpGUI $help
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilMMTabHandling

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

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

Constructor & Destructor Documentation

◆ __construct()

ilMMTabHandling::__construct ( int  $ref_id)

ilMMTabHandling constructor.

Parameters
int$ref_id

Definition at line 43 of file class.ilMMTabHandling.php.

References $DIC, $ref_id, ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

44  {
45  global $DIC;
46 
47  $this->ref_id = $ref_id;
48  $this->tabs = $DIC['ilTabs'];
49  $this->lng = $DIC->language();
50  $this->lng->loadLanguageModule('mme');
51  $this->ctrl = $DIC['ilCtrl'];
52  $this->rbacsystem = $DIC['rbacsystem'];
53  $this->help = $DIC->help();
54  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ initTabs()

ilMMTabHandling::initTabs ( ?string  $tab,
?string  $subtab = null,
bool  $backtab = false,
?string  $calling_class = "" 
)

PhpSwitchStatementWitSingleBranchInspection

Definition at line 56 of file class.ilMMTabHandling.php.

References ilMMSubItemGUI\CMD_VIEW_SUB_ITEMS, ilMMTopItemGUI\CMD_VIEW_TOP_ITEMS, ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ilObjMainMenuGUI\TAB_MAIN, and ILIAS\Repository\tabs().

61  : void {
62  $this->tabs->clearTargets(); // clears Help-ID
63 
64  // Help Screen-ID
65  $this->help->setScreenIdComponent('mme');
66  if ($tab !== null) {
67  $this->help->setScreenId($tab);
68  }
69  if ($subtab !== null) {
70  $this->help->setSubScreenId($subtab);
71  }
72 
73  if ($this->rbacsystem->checkAccess('visible,read', $this->ref_id)) {
74  $this->tabs->addTab(
76  $this->lng->txt(ilObjMainMenuGUI::TAB_MAIN),
77  $this->ctrl->getLinkTargetByClass(ilObjMainMenuGUI::class, ilObjMainMenuGUI::TAB_MAIN)
78  );
80  switch ($tab) {
82  $this->tabs->addSubTab(
85  $this->ctrl->getLinkTargetByClass(ilMMTopItemGUI::class, ilMMTopItemGUI::CMD_VIEW_TOP_ITEMS)
86  );
87  $this->tabs->addSubTab(
90  $this->ctrl->getLinkTargetByClass(ilMMSubItemGUI::class, ilMMSubItemGUI::CMD_VIEW_SUB_ITEMS)
91  );
92  $this->tabs->activateSubTab($subtab);
93  break;
94  }
95  if ($subtab === null) {
97  }
98  $this->tabs->activateSubTab($subtab);
99  }
100  if ($this->rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
101  $this->tabs->addTab(
102  'perm_settings',
103  $this->lng->txt('perm_settings'),
104  $this->ctrl->getLinkTargetByClass(array(ilObjMainMenuGUI::class, ilPermissionGUI::class), 'perm')
105  );
106  }
107  if ($backtab) {
108  $this->tabs->clearTargets();
109  if ($calling_class == ilMMSubItemGUI::class) {
110  $this->tabs->setBackTarget($this->lng->txt('tab_back'), $this->ctrl->getLinkTargetByClass(ilMMSubItemGUI::class, $subtab));
111  } else {
112  $this->tabs->setBackTarget($this->lng->txt('tab_back'), $this->ctrl->getLinkTargetByClass(ilObjMainMenuGUI::class, $subtab));
113  }
114  }
115  $this->tabs->activateTab($tab);
116  }
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilMMTabHandling::$ctrl
protected

Definition at line 35 of file class.ilMMTabHandling.php.

◆ $help

ilHelpGUI ilMMTabHandling::$help
private

Definition at line 37 of file class.ilMMTabHandling.php.

◆ $lng

ilLanguage ilMMTabHandling::$lng
private

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

◆ $rbacsystem

ilRbacSystem ilMMTabHandling::$rbacsystem
private

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

◆ $ref_id

int ilMMTabHandling::$ref_id
private

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

Referenced by __construct().

◆ $tabs

ilTabsGUI ilMMTabHandling::$tabs
private

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


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