ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilMDSettingsControllerGUI Class Reference

@ilCtrl_Calls ilMDSettingsControllerGUI: ilMDCopyrightConfigurationGUI, ilMDOERSettingsGUI, ilMDVocabulariesGUI @ilCtrl_Calls ilMDSettingsControllerGUI: ilMDPublishingSettingsGUI 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 PUBLISHING_SETTINGS_TAB = 'publishing_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 38 of file class.ilMDSettingsControllerGUI.php.

39 {
40 global $DIC;
41
42 $this->ctrl = $DIC->ctrl();
43 $this->lng = $DIC->language();
44 $this->tabs_gui = $DIC->tabs();
45 $this->parent_obj_gui = $parent_obj_gui;
46
47 $this->access_service = new ilMDSettingsAccessService(
48 $this->parent_obj_gui->getRefId(),
49 $DIC->access()
50 );
51
52 $this->lng->loadLanguageModule("meta");
53 }
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 55 of file class.ilMDSettingsControllerGUI.php.

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

101 : void
102 {
103 if (!$this->access_service->hasCurrentUserReadAccess()) {
104 return;
105 }
106
107 $this->tabs_gui->addSubTab(
108 self::OER_SETTINGS_TAB,
109 $this->lng->txt('md_settings'),
110 $this->ctrl->getLinkTargetByClass(
111 ilMDOERSettingsGUI::class,
112 'showOERSettings'
113 )
114 );
115
116 $this->tabs_gui->addSubTab(
117 self::PUBLISHING_SETTINGS_TAB,
118 $this->lng->txt('md_publishing'),
119 $this->ctrl->getLinkTargetByClass(
120 ilMDPublishingSettingsGUI::class,
121 'showPublishingSettings'
122 )
123 );
124
125 $this->tabs_gui->addSubTab(
126 self::COPYRIGHT_CONFIG_TAB,
127 $this->lng->txt('md_copyright_selection'),
128 $this->ctrl->getLinkTargetByClass(
129 ilMDCopyrightConfigurationGUI::class,
130 'showCopyrightSelection'
131 )
132 );
133
134 $this->tabs_gui->addSubTab(
135 self::VOCABULARIES_TAB,
136 $this->lng->txt('md_vocabularies_config'),
137 $this->ctrl->getLinkTargetByClass(
138 ilMDVocabulariesGUI::class,
139 'showVocabularies'
140 )
141 );
142 }

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 35 of file class.ilMDSettingsControllerGUI.php.

◆ $ctrl

ilCtrl ilMDSettingsControllerGUI::$ctrl
protected

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

◆ $lng

ilLanguage ilMDSettingsControllerGUI::$lng
protected

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

◆ $parent_obj_gui

ilObjMDSettingsGUI ilMDSettingsControllerGUI::$parent_obj_gui
protected

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

Referenced by __construct().

◆ $tabs_gui

ilTabsGUI ilMDSettingsControllerGUI::$tabs_gui
protected

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

◆ COPYRIGHT_CONFIG_TAB

const string ilMDSettingsControllerGUI::COPYRIGHT_CONFIG_TAB = 'md_copyright_config'
protected

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

◆ OER_SETTINGS_TAB

const string ilMDSettingsControllerGUI::OER_SETTINGS_TAB = 'md_oer_settings'
protected

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

◆ PUBLISHING_SETTINGS_TAB

const string ilMDSettingsControllerGUI::PUBLISHING_SETTINGS_TAB = 'publishing_settings'
protected

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

◆ VOCABULARIES_TAB

const string ilMDSettingsControllerGUI::VOCABULARIES_TAB = 'md_vocabularies'
protected

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


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