ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjCourseAdministrationGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once "./Services/Membership/classes/class.ilMembershipAdministrationGUI.php" ;
5 
17 {
18  private const SETTING_COURSES_AND_GROUPS_ENABLED = 'mmbr_my_crs_grp';
19 
20  protected function getType()
21  {
22  return "crss";
23  }
24 
25  protected function getParentObjType()
26  {
27  return "crs";
28  }
29 
30  protected function getAdministrationFormId()
31  {
33  }
34 
35  protected function addChildContentsTo($form)
36  {
37  $checkBox = new ilCheckboxInputGUI($this->lng->txt('crs_my_courses_groups_enabled'), self::SETTING_COURSES_AND_GROUPS_ENABLED);
38  $checkBox->setInfo($this->lng->txt('crs_my_courses_groups_enabled_info'));
39  $checkBox->setChecked((bool) $this->settings->get(self::SETTING_COURSES_AND_GROUPS_ENABLED, 1));
40  $form->addItem($checkBox);
41  return $form;
42  }
43 
44  protected function saveChildSettings($form)
45  {
46  $this->settings->set(self::SETTING_COURSES_AND_GROUPS_ENABLED, (int) $form->getInput(self::SETTING_COURSES_AND_GROUPS_ENABLED));
47  }
48 
49  protected function getChildSettingsInfo($a_form_id)
50  {
51  switch ($a_form_id) {
53  $this->lng->loadLanguageModule("crs");
54  $fields = [
55  'crs_my_courses_groups_enabled' => [ (bool) $this->settings->get(self::SETTING_COURSES_AND_GROUPS_ENABLED, 1), ilAdministrationSettingsFormHandler::VALUE_BOOL ]
56  ];
57  return [ [ "editSettings", $fields ] ];
58  }
59  return [];
60  }
61 }
settings()
Definition: settings.php:2
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Information Text.
Membership Administration Settings.