ILIAS  release_7 Revision v7.30-3-g800a261c036
ilMembershipRegistrationSettingsGUI Class Reference

Registration settings. More...

+ Inheritance diagram for ilMembershipRegistrationSettingsGUI:
+ Collaboration diagram for ilMembershipRegistrationSettingsGUI:

Public Member Functions

 __construct (ilObjectGUI $gui_object, ilObject $object, $a_options)
 Constructor. More...
 
 setFormValues (ilPropertyFormGUI $form)
 Set form values. More...
 
 getCurrentObject ()
 Get current object. More...
 
 getCurrentGUI ()
 Get gui object. More...
 
 getOptions ()
 Get options. More...
 
 addMembershipFormElements (ilPropertyFormGUI $form, $a_parent_post='')
 Add membership form elements. More...
 

Protected Member Functions

 txt ($a_lang_key)
 Translate type specific. More...
 

Private Attributes

 $object = null
 
 $gui_object = null
 
 $options = array()
 

Detailed Description

Registration settings.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 15 of file class.ilMembershipRegistrationSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMembershipRegistrationSettingsGUI::__construct ( ilObjectGUI  $gui_object,
ilObject  $object,
  $a_options 
)

Constructor.

Parameters
ilObjectGUI$gui_object
ilObject$object

Reimplemented in ilSessionMembershipRegistrationSettingsGUI.

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

References $gui_object, and $object.

Member Function Documentation

◆ addMembershipFormElements()

ilMembershipRegistrationSettingsGUI::addMembershipFormElements ( ilPropertyFormGUI  $form,
  $a_parent_post = '' 
)
final

Add membership form elements.

Parameters
ilPropertyFormGUI$form

Definition at line 69 of file class.ilMembershipRegistrationSettingsGUI.php.

70 {
71 // Registration type
72 $reg_type = new ilRadioGroupInputGUI($this->txt('reg_type'), 'registration_type');
73 //$reg_type->setValue($this->object->getRegistrationType());
74
76 $opt_dir = new ilRadioOption($this->txt('reg_direct'), ilMembershipRegistrationSettings::TYPE_DIRECT);
77 $opt_dir->setInfo($this->txt('reg_direct_info'));
78 $reg_type->addOption($opt_dir);
79
80 // cannot participate
81 $cannot_participate = new ilCheckboxInputGUI(
82 $this->txt('reg_cannot_participate'),
83 'show_cannot_participate_direct'
84 );
85 $cannot_participate->setInfo($this->txt('reg_cannot_participate_info'));
86 $cannot_participate->setValue(1);
87 $opt_dir->addSubItem($cannot_participate);
88 }
90 $opt_pass = new ilRadioOption($this->txt('reg_pass'), ilMembershipRegistrationSettings::TYPE_PASSWORD);
91 $pass = new ilTextInputGUI($GLOBALS['DIC']['lng']->txt("password"), 'password');
92 $pass->setInfo($this->txt('reg_password_info'));
93 #$pass->setValue($this->object->getPassword());
94 $pass->setSize(10);
95 $pass->setMaxLength(32);
96 $opt_pass->addSubItem($pass);
97 $reg_type->addOption($opt_pass);
98 }
99
101 $opt_req = new ilRadioOption($this->txt('reg_request'), ilMembershipRegistrationSettings::TYPE_REQUEST, $this->txt('reg_request_info'));
102 $reg_type->addOption($opt_req);
103
104 // cannot participate
105 $cannot_participate = new ilCheckboxInputGUI(
106 $this->txt('reg_cannot_participate'),
107 'show_cannot_participate_request'
108 );
109 $cannot_participate->setInfo($this->txt('reg_cannot_participate_info'));
110 $cannot_participate->setValue(1);
111 $opt_req->addSubItem($cannot_participate);
112
113 }
115 $opt_tutor = new ilRadioOption(
116 $this->txt('reg_tutor'),
118 $this->txt('reg_tutor_info')
119 );
120 $reg_type->addOption($opt_tutor);
121 }
123 $opt_deact = new ilRadioOption($this->txt('reg_disabled'), ilMembershipRegistrationSettings::TYPE_NONE, $this->txt('reg_disabled_info'));
124 $reg_type->addOption($opt_deact);
125 }
126
127 // Add to form
128 $form->addItem($reg_type);
129
131 // max member
132 $lim = new ilCheckboxInputGUI($this->txt('reg_max_members_short'), 'registration_membership_limited');
133 $lim->setValue(1);
134 #$lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
135 #$lim->setChecked($this->object->isMembershipLimited());
136
137 /* JF, 2015-08-31 - only used in sessions which cannot support min members (yet)
138 $min = new ilTextInputGUI($this->txt('reg_min_members'),'registration_min_members');
139 $min->setSize(3);
140 $min->setMaxLength(4);
141 $min->setInfo($this->txt('reg_min_members_info'));
142 $lim->addSubItem($min);
143 */
144
145 $max = new ilTextInputGUI($this->txt('reg_max_members'), 'registration_max_members');
146 #$max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
147 //$max->setTitle($this->lng->txt('members'));
148 $max->setSize(3);
149 $max->setMaxLength(4);
150 $max->setInfo($this->txt('reg_max_members_info'));
151 $lim->addSubItem($max);
152
153 /*
154 $wait = new ilCheckboxInputGUI($this->txt('reg_waiting_list'),'waiting_list');
155 $wait->setValue(1);
156 //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
157 $wait->setInfo($this->txt('reg_waiting_list_info'));
158 #$wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
159 $lim->addSubItem($wait);
160 */
161
162 $wait = new ilRadioGroupInputGUI($this->txt('reg_waiting_list'), 'waiting_list');
163
164 $option = new ilRadioOption($this->txt('reg_waiting_list_none'), 0);
165 $wait->addOption($option);
166
167 $option = new ilRadioOption($this->txt('reg_waiting_list_no_autofill'), 1);
168 $option->setInfo($this->txt('reg_waiting_list_no_autofill_info'));
169 $wait->addOption($option);
170
171 $option = new ilRadioOption($this->txt('reg_waiting_list_autofill'), 2);
172 $option->setInfo($this->txt('reg_waiting_list_autofill_info'));
173 $wait->addOption($option);
174
175 $lim->addSubItem($wait);
176
177 $form->addItem($lim);
178 }
179
180 $notificationCheckbox = new ilCheckboxInputGUI($this->txt('registration_notification'), 'registration_notification');
181 $notificationCheckbox->setInfo($this->txt('registration_notification_info'));
182
183 $notificationOption = new ilRadioGroupInputGUI($this->txt('notification_option'), 'notification_option');
184 $notificationOption->setRequired(true);
185
187 $inheritOption->setInfo($this->txt('notification_option_inherit_info'));
188 $notificationOption->addOption($inheritOption);
189
191 $manualOption->setInfo($this->txt('notification_option_manual_info'));
192 $notificationOption->addOption($manualOption);
193
194 $notificationCheckbox->addSubItem($notificationOption);
195 $form->addItem($notificationCheckbox);
196
197 $this->setFormValues($form);
198 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
This class represents a checkbox property in a property form.
setFormValues(ilPropertyFormGUI $form)
Set form values.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text property in a property form.

References $GLOBALS, $pass, ilPropertyFormGUI\addItem(), getOptions(), ilSessionConstants\NOTIFICATION_INHERIT_OPTION, ilSessionConstants\NOTIFICATION_MANUAL_OPTION, ilMembershipRegistrationSettings\REGISTRATION_LIMITED_USERS, setFormValues(), txt(), ilMembershipRegistrationSettings\TYPE_DIRECT, ilMembershipRegistrationSettings\TYPE_NONE, ilMembershipRegistrationSettings\TYPE_PASSWORD, ilMembershipRegistrationSettings\TYPE_REQUEST, and ilMembershipRegistrationSettings\TYPE_TUTOR.

+ Here is the call graph for this function:

◆ getCurrentGUI()

ilMembershipRegistrationSettingsGUI::getCurrentGUI ( )

Get gui object.

Returns
ilObjectGUI

Definition at line 51 of file class.ilMembershipRegistrationSettingsGUI.php.

52 {
53 return $this->gui_object;
54 }

References $gui_object.

◆ getCurrentObject()

ilMembershipRegistrationSettingsGUI::getCurrentObject ( )

Get current object.

Returns
ilObject

Definition at line 42 of file class.ilMembershipRegistrationSettingsGUI.php.

43 {
44 return $this->object;
45 }

References $object.

Referenced by ilSessionMembershipRegistrationSettingsGUI\setFormValues(), and txt().

+ Here is the caller graph for this function:

◆ getOptions()

ilMembershipRegistrationSettingsGUI::getOptions ( )

Get options.

Returns
array

Definition at line 60 of file class.ilMembershipRegistrationSettingsGUI.php.

References $options.

Referenced by addMembershipFormElements().

+ Here is the caller graph for this function:

◆ setFormValues()

ilMembershipRegistrationSettingsGUI::setFormValues ( ilPropertyFormGUI  $form)
abstract

Set form values.

Reimplemented in ilSessionMembershipRegistrationSettingsGUI.

Referenced by addMembershipFormElements().

+ Here is the caller graph for this function:

◆ txt()

ilMembershipRegistrationSettingsGUI::txt (   $a_lang_key)
protected

Translate type specific.

Definition at line 203 of file class.ilMembershipRegistrationSettingsGUI.php.

204 {
205 $prefix = $this->getCurrentObject()->getType();
206 return $GLOBALS['DIC']['lng']->txt($prefix . '_' . $a_lang_key);
207 }

References $GLOBALS, and getCurrentObject().

Referenced by addMembershipFormElements().

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

Field Documentation

◆ $gui_object

ilMembershipRegistrationSettingsGUI::$gui_object = null
private

◆ $object

ilMembershipRegistrationSettingsGUI::$object = null
private

◆ $options

ilMembershipRegistrationSettingsGUI::$options = array()
private

Definition at line 19 of file class.ilMembershipRegistrationSettingsGUI.php.

Referenced by getOptions().


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