ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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

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

References $form, $gui_object, $object, and setFormValues().

27  {
28  $this->gui_object = $gui_object;
29  $this->object = $object;
30  $this->options = $a_options;
31  }
+ Here is the call graph for this function:

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.

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

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  }
81  $opt_pass = new ilRadioOption($this->txt('reg_pass'), ilMembershipRegistrationSettings::TYPE_PASSWORD);
82  $pass = new ilTextInputGUI($GLOBALS['lng']->txt("password"), 'password');
83  $pass->setInfo($this->txt('reg_password_info'));
84  #$pass->setValue($this->object->getPassword());
85  $pass->setSize(10);
86  $pass->setMaxLength(32);
87  $opt_pass->addSubItem($pass);
88  $reg_type->addOption($opt_pass);
89  }
90 
92  $opt_req = new ilRadioOption($this->txt('reg_request'), ilMembershipRegistrationSettings::TYPE_REQUEST, $this->txt('reg_request_info'));
93  $reg_type->addOption($opt_req);
94  }
96  $opt_deact = new ilRadioOption($this->txt('reg_disabled'), ilMembershipRegistrationSettings::TYPE_NONE, $this->txt('reg_disabled_info'));
97  $reg_type->addOption($opt_deact);
98  }
99 
100  // Add to form
101  $form->addItem($reg_type);
102 
104  // max member
105  $lim = new ilCheckboxInputGUI($this->txt('reg_max_members_short'), 'registration_membership_limited');
106  $lim->setValue(1);
107  #$lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
108  #$lim->setChecked($this->object->isMembershipLimited());
109 
110  /* JF, 2015-08-31 - only used in sessions which cannot support min members (yet)
111  $min = new ilTextInputGUI($this->txt('reg_min_members'),'registration_min_members');
112  $min->setSize(3);
113  $min->setMaxLength(4);
114  $min->setInfo($this->txt('reg_min_members_info'));
115  $lim->addSubItem($min);
116  */
117 
118  $max = new ilTextInputGUI($this->txt('reg_max_members'), 'registration_max_members');
119  #$max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
120  //$max->setTitle($this->lng->txt('members'));
121  $max->setSize(3);
122  $max->setMaxLength(4);
123  $max->setInfo($this->txt('reg_max_members_info'));
124  $lim->addSubItem($max);
125 
126  /*
127  $wait = new ilCheckboxInputGUI($this->txt('reg_waiting_list'),'waiting_list');
128  $wait->setValue(1);
129  //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
130  $wait->setInfo($this->txt('reg_waiting_list_info'));
131  #$wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
132  $lim->addSubItem($wait);
133  */
134 
135  $wait = new ilRadioGroupInputGUI($this->txt('reg_waiting_list'), 'waiting_list');
136 
137  $option = new ilRadioOption($this->txt('reg_waiting_list_none'), 0);
138  $wait->addOption($option);
139 
140  $option = new ilRadioOption($this->txt('reg_waiting_list_no_autofill'), 1);
141  $option->setInfo($this->txt('reg_waiting_list_no_autofill_info'));
142  $wait->addOption($option);
143 
144  $option = new ilRadioOption($this->txt('reg_waiting_list_autofill'), 2);
145  $option->setInfo($this->txt('reg_waiting_list_autofill_info'));
146  $wait->addOption($option);
147 
148  $lim->addSubItem($wait);
149 
150  $form->addItem($lim);
151  }
152 
153  $this->setFormValues($form);
154  }
This class represents an option in a radio group.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a property in a property form.
This class represents a text property in a property form.
setFormValues(ilPropertyFormGUI $form)
Set form values.
+ Here is the call graph for this function:

◆ getCurrentGUI()

ilMembershipRegistrationSettingsGUI::getCurrentGUI ( )

◆ getCurrentObject()

ilMembershipRegistrationSettingsGUI::getCurrentObject ( )

Get current object.

Returns
ilObject

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

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.

Referenced by __construct(), and addMembershipFormElements().

+ Here is the caller graph for this function:

◆ txt()

ilMembershipRegistrationSettingsGUI::txt (   $a_lang_key)
protected

Translate type specific.

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

References $GLOBALS, and getCurrentObject().

Referenced by addMembershipFormElements().

160  {
161  $prefix = $this->getCurrentObject()->getType();
162  return $GLOBALS['lng']->txt($prefix . '_' . $a_lang_key);
163  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
+ 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

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

Referenced by __construct(), and getCurrentGUI().

◆ $object

ilMembershipRegistrationSettingsGUI::$object = null
private

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

Referenced by __construct(), and getCurrentObject().

◆ $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: