ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMDSettingsControllerGUI Class Reference

@ilCtrl_Calls ilMDSettingsControllerGUI: ilMDCopyrightConfigurationGUI, ilMDOERSettingsGUI, ilMDVocabulariesGUI More...

+ Collaboration diagram for ilMDSettingsControllerGUI:

Public Member Functions

 __construct (ilObjMDSettingsGUI $parent_obj_gui)
 
 executeCommand ()
 

Protected Member Functions

 setTabs ()
 

Protected Attributes

const string OER_SETTINGS_TAB = 'md_oer_settings'
 
const string COPYRIGHT_CONFIG_TAB = 'md_copyright_config'
 
const string VOCABULARIES_TAB = 'md_vocabularies'
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilMDSettingsAccessService $access_service
 
ilObjMDSettingsGUI $parent_obj_gui
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMDSettingsControllerGUI::__construct ( ilObjMDSettingsGUI  $parent_obj_gui)

Definition at line 36 of file class.ilMDSettingsControllerGUI.php.

37 {
38 global $DIC;
39
40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
42 $this->tabs_gui = $DIC->tabs();
43 $this->parent_obj_gui = $parent_obj_gui;
44
45 $this->access_service = new ilMDSettingsAccessService(
46 $this->parent_obj_gui->getRefId(),
47 $DIC->access()
48 );
49
50 $this->lng->loadLanguageModule("meta");
51 }
global $DIC
Definition: shib_login.php:26

References $DIC, $parent_obj_gui, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilMDSettingsControllerGUI::executeCommand ( )

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

53 : void
54 {
55 $next_class = $this->ctrl->getNextClass($this);
56 $cmd = $this->ctrl->getCmd();
57
58 $this->setTabs();
59
60 if (
61 !$this->access_service->hasCurrentUserVisibleAccess() ||
62 !$this->access_service->hasCurrentUserReadAccess()
63 ) {
64 throw new ilPermissionException($this->lng->txt('no_permission'));
65 }
66
67 switch ($next_class) {
68 case strtolower(ilMDCopyrightConfigurationGUI::class):
69 $this->tabs_gui->activateSubTab(self::COPYRIGHT_CONFIG_TAB);
70 $gui = new ilMDCopyrightConfigurationGUI($this->parent_obj_gui);
71 $this->ctrl->forwardCommand($gui);
72 break;
73
74 case strtolower(ilMDOERSettingsGUI::class):
75 $this->tabs_gui->activateSubTab(self::OER_SETTINGS_TAB);
76 $gui = new ilMDOERSettingsGUI($this->parent_obj_gui);
77 $this->ctrl->forwardCommand($gui);
78 break;
79
80 case strtolower(ilMDVocabulariesGUI::class):
81 $this->tabs_gui->activateSubTab(self::VOCABULARIES_TAB);
82 $gui = new ilMDVocabulariesGUI($this->parent_obj_gui);
83 $this->ctrl->forwardCommand($gui);
84 break;
85
86 default:
87 $this->tabs_gui->activateSubTab(self::OER_SETTINGS_TAB);
88 $this->ctrl->redirectByClass(
89 ilMDOERSettingsGUI::class,
90 'showOERSettings'
91 );
92 break;
93 }
94 }
@ilCtrl_Calls ilMDCopyrightConfigurationGUI: ilMDCopyrightUsageGUI, ilMDCopyrightImageUploadHandlerGU...
@ilCtrl_Calls ilMDVocabulariesGUI: ilMDVocabularyUploadHandlerGUI

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and setTabs().

+ Here is the call graph for this function:

◆ setTabs()

ilMDSettingsControllerGUI::setTabs ( )
protected

Definition at line 96 of file class.ilMDSettingsControllerGUI.php.

96 : void
97 {
98 if (
99 !$this->access_service->hasCurrentUserVisibleAccess() ||
100 !$this->access_service->hasCurrentUserReadAccess()
101 ) {
102 return;
103 }
104
105 $this->tabs_gui->addSubTab(
106 self::OER_SETTINGS_TAB,
107 $this->lng->txt('md_settings'),
108 $this->ctrl->getLinkTargetByClass(
109 ilMDOERSettingsGUI::class,
110 'showOERSettings'
111 )
112 );
113
114 $this->tabs_gui->addSubTab(
115 self::COPYRIGHT_CONFIG_TAB,
116 $this->lng->txt('md_copyright_selection'),
117 $this->ctrl->getLinkTargetByClass(
118 ilMDCopyrightConfigurationGUI::class,
119 'showCopyrightSelection'
120 )
121 );
122
123 $this->tabs_gui->addSubTab(
124 self::VOCABULARIES_TAB,
125 $this->lng->txt('md_vocabularies_config'),
126 $this->ctrl->getLinkTargetByClass(
127 ilMDVocabulariesGUI::class,
128 'showVocabularies'
129 )
130 );
131 }

References ILIAS\Repository\lng().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access_service

ilMDSettingsAccessService ilMDSettingsControllerGUI::$access_service
protected

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

◆ $ctrl

ilCtrl ilMDSettingsControllerGUI::$ctrl
protected

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

◆ $lng

ilLanguage ilMDSettingsControllerGUI::$lng
protected

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

◆ $parent_obj_gui

ilObjMDSettingsGUI ilMDSettingsControllerGUI::$parent_obj_gui
protected

Definition at line 34 of file class.ilMDSettingsControllerGUI.php.

Referenced by __construct().

◆ $tabs_gui

ilTabsGUI ilMDSettingsControllerGUI::$tabs_gui
protected

Definition at line 32 of file class.ilMDSettingsControllerGUI.php.

◆ COPYRIGHT_CONFIG_TAB

const string ilMDSettingsControllerGUI::COPYRIGHT_CONFIG_TAB = 'md_copyright_config'
protected

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

◆ OER_SETTINGS_TAB

const string ilMDSettingsControllerGUI::OER_SETTINGS_TAB = 'md_oer_settings'
protected

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

◆ VOCABULARIES_TAB

const string ilMDSettingsControllerGUI::VOCABULARIES_TAB = 'md_vocabularies'
protected

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


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