ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\SurveyQuestionPool\Settings\SettingsGUI Class Reference
+ Collaboration diagram for ILIAS\SurveyQuestionPool\Settings\SettingsGUI:

Public Member Functions

 __construct (protected InternalDataService $data, protected InternalDomainService $domain, protected InternalGUIService $gui, protected int $obj_id, protected int $ref_id)
 
 executeCommand ()
 

Protected Member Functions

 edit ()
 
 getEditForm ()
 
 save ()
 

Protected Attributes

ilSetting $global_settings
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\SurveyQuestionPool\Settings\SettingsGUI::__construct ( protected InternalDataService  $data,
protected InternalDomainService  $domain,
protected InternalGUIService  $gui,
protected int  $obj_id,
protected int  $ref_id 
)

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

38  {
39  }

Member Function Documentation

◆ edit()

ILIAS\SurveyQuestionPool\Settings\SettingsGUI::edit ( )
protected

Definition at line 55 of file class.SettingsGUI.php.

References ILIAS\SurveyQuestionPool\Settings\SettingsGUI\getEditForm().

55  : void
56  {
57  $mt = $this->gui->ui()->mainTemplate();
58  $form = $this->getEditForm();
59  $mt->setContent($form->render());
60  }
+ Here is the call graph for this function:

◆ executeCommand()

ILIAS\SurveyQuestionPool\Settings\SettingsGUI::executeCommand ( )

Definition at line 41 of file class.SettingsGUI.php.

41  : void
42  {
43  $ctrl = $this->gui->ctrl();
44  $next_class = $ctrl->getNextClass($this);
45  $cmd = $ctrl->getCmd("edit");
46 
47  switch ($next_class) {
48  default:
49  if (in_array($cmd, ["edit", "save"])) {
50  $this->$cmd();
51  }
52  }
53  }

◆ getEditForm()

ILIAS\SurveyQuestionPool\Settings\SettingsGUI::getEditForm ( )
protected

Definition at line 62 of file class.SettingsGUI.php.

References $lng, ILIAS\Repository\Form\addOnline(), ILIAS\Repository\Form\addStdTile(), and ILIAS\Repository\Form\addStdTitleAndDescription().

Referenced by ILIAS\SurveyQuestionPool\Settings\SettingsGUI\edit(), and ILIAS\SurveyQuestionPool\Settings\SettingsGUI\save().

62  : FormAdapterGUI
63  {
64  //$settings = $this->domain->mediapoolSettings()->getById($this->obj_id);
65  $lng = $this->domain->lng();
66 
67  $form = $this->gui
68  ->form(self::class, "save")
69  ->section("general", $lng->txt("properties"))
70  ->addStdTitleAndDescription($this->obj_id, "spl")
71  ->section("avail", $lng->txt("rep_activation_availability"))
72  ->addOnline($this->obj_id, "spl")
73  ->addStdAvailability($this->ref_id, "spl")
74  ->section("presentation", $lng->txt("obj_presentation"))
75  ->addStdTile($this->obj_id, "spl");
76  return $form;
77  }
addStdTitleAndDescription(int $obj_id, string $type)
addStdTile(int $obj_id, string $type)
global $lng
Definition: privfeed.php:31
addOnline(int $obj_id, string $type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ILIAS\SurveyQuestionPool\Settings\SettingsGUI::save ( )
protected

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

References $lng, and ILIAS\SurveyQuestionPool\Settings\SettingsGUI\getEditForm().

79  : void
80  {
81  $mt = $this->gui->ui()->mainTemplate();
82  $form = $this->getEditForm();
83  $ctrl = $this->gui->ctrl();
84  $lng = $this->domain->lng();
85 
86  if ($form->isValid()) {
87 
88  $form->saveStdTitleAndDescription($this->obj_id, "spl");
89  $form->saveStdTile($this->obj_id, "spl");
90  $form->saveOnline($this->obj_id, "spl");
91  $form->saveStdAvailability($this->ref_id);
92 
93  // we still need the svy_qpl record for now
94  // but it may be abandoned in the future, if it does not contain new properties
95  $pool = new \ilObjSurveyQuestionPool($this->ref_id);
96  $pool->saveToDb();
97 
98  $mt->setOnScreenMessage("success", $lng->txt("msg_obj_modified"), true);
99  $ctrl->redirectByClass(self::class, "edit");
100  } else {
101  $mt = $this->gui->ui()->mainTemplate();
102  $mt->setContent($form->render());
103  }
104  }
global $lng
Definition: privfeed.php:31
+ Here is the call graph for this function:

Field Documentation

◆ $global_settings

ilSetting ILIAS\SurveyQuestionPool\Settings\SettingsGUI::$global_settings
protected

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


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