ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilStudyProgrammeCommonSettingsGUI Class Reference
+ Collaboration diagram for ilStudyProgrammeCommonSettingsGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilObjectService $object_service)
 
 executeCommand ()
 
 setObject (ilObjStudyProgramme $object)
 

Data Fields

const CMD_EDIT = 'editSettings'
 
const CMD_SAVE = 'saveSettings'
 

Protected Member Functions

 editSettings (ilPropertyFormGUI $form=null)
 
 buildForm ()
 
 addServiceSettingsToForm (ilPropertyFormGUI $form)
 
 saveSettings ()
 
 txt (string $code)
 

Protected Attributes

 $object
 
 $ctrl
 
 $tpl
 
 $lng
 
 $object_service
 

Detailed Description

Definition at line 5 of file class.ilStudyProgrammeCommonSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addServiceSettingsToForm()

ilStudyProgrammeCommonSettingsGUI::addServiceSettingsToForm ( ilPropertyFormGUI  $form)
protected

Definition at line 92 of file class.ilStudyProgrammeCommonSettingsGUI.php.

93 {
95 $this->object->getId(),
96 $form,
97 [
99 ]
100 );
101 }
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.

References ilObjectServiceSettingsGUI\initServiceSettingsForm(), and ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS.

Referenced by buildForm().

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

◆ buildForm()

ilStudyProgrammeCommonSettingsGUI::buildForm ( )
protected

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

80 {
81 $form = new ilPropertyFormGUI();
82 $form->setFormAction($this->ctrl->getFormAction($this));
83 $form->setTitle($this->txt('obj_features'));
84 $form->addCommandButton(self::CMD_SAVE, $this->txt('save'));
85 $form->addCommandButton(self::CMD_EDIT, $this->txt('cancel'));
86
87 $this->addServiceSettingsToForm($form);
88
89 return $form;
90 }
This class represents a property form user interface.

References addServiceSettingsToForm(), and txt().

Referenced by editSettings(), and saveSettings().

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

◆ editSettings()

ilStudyProgrammeCommonSettingsGUI::editSettings ( ilPropertyFormGUI  $form = null)
protected

Definition at line 71 of file class.ilStudyProgrammeCommonSettingsGUI.php.

72 {
73 if (is_null($form)) {
74 $form = $this->buildForm();
75 }
76 return $form->getHTML();
77 }

References buildForm().

Referenced by executeCommand(), and saveSettings().

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

◆ executeCommand()

ilStudyProgrammeCommonSettingsGUI::executeCommand ( )

Definition at line 47 of file class.ilStudyProgrammeCommonSettingsGUI.php.

48 {
49 if (is_null($this->object)) {
50 throw new ilException('Object of ilObjStudyProgramme is not set');
51 }
52
53 $cmd = $this->ctrl->getCmd();
54 switch ($cmd) {
55 case self::CMD_EDIT:
56 return $this->editSettings();
57 break;
58 case self::CMD_SAVE:
59 $this->saveSettings();
60 break;
61 default:
62 throw new Exception('Unknown command ' . $cmd);
63 }
64 }
Base class for ILIAS Exception handling.

References CMD_EDIT, CMD_SAVE, editSettings(), and saveSettings().

+ Here is the call graph for this function:

◆ saveSettings()

ilStudyProgrammeCommonSettingsGUI::saveSettings ( )
protected

Definition at line 103 of file class.ilStudyProgrammeCommonSettingsGUI.php.

104 {
105 $form = $this->buildForm();
106
107 if (!$form->checkInput()) {
108 $form->setValuesByPost();
109 $this->editSettings($form);
110 return;
111 }
112
114 $this->object->getId(),
115 $form,
116 [
118 ]
119 );
120
121 ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
122 $this->ctrl->redirect($this, self::CMD_EDIT);
123 }
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.

References buildForm(), editSettings(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

Referenced by executeCommand().

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

◆ setObject()

ilStudyProgrammeCommonSettingsGUI::setObject ( ilObjStudyProgramme  $object)

◆ txt()

ilStudyProgrammeCommonSettingsGUI::txt ( string  $code)
protected

Definition at line 125 of file class.ilStudyProgrammeCommonSettingsGUI.php.

125 : string
126 {
127 return $this->lng->txt($code);
128 }

Referenced by buildForm().

+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilStudyProgrammeCommonSettingsGUI::$ctrl
protected

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

Referenced by __construct().

◆ $lng

ilStudyProgrammeCommonSettingsGUI::$lng
protected

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

Referenced by __construct().

◆ $object

ilStudyProgrammeCommonSettingsGUI::$object
protected

Definition at line 13 of file class.ilStudyProgrammeCommonSettingsGUI.php.

Referenced by setObject().

◆ $object_service

ilStudyProgrammeCommonSettingsGUI::$object_service
protected

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

Referenced by __construct().

◆ $tpl

ilStudyProgrammeCommonSettingsGUI::$tpl
protected

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

Referenced by __construct().

◆ CMD_EDIT

const ilStudyProgrammeCommonSettingsGUI::CMD_EDIT = 'editSettings'

Definition at line 7 of file class.ilStudyProgrammeCommonSettingsGUI.php.

Referenced by executeCommand().

◆ CMD_SAVE

const ilStudyProgrammeCommonSettingsGUI::CMD_SAVE = 'saveSettings'

Definition at line 8 of file class.ilStudyProgrammeCommonSettingsGUI.php.

Referenced by executeCommand().


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