ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
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 $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  {
77  $opt_dir = new ilRadioOption($this->txt('reg_direct'), ilMembershipRegistrationSettings::TYPE_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
78  $reg_type->addOption($opt_dir);
79  }
81  {
82  $opt_pass = new ilRadioOption($this->txt('reg_pass'), ilMembershipRegistrationSettings::TYPE_PASSWORD);
83  $pass = new ilTextInputGUI($GLOBALS['lng']->txt("password"),'password');
84  $pass->setInfo($this->txt('reg_password_info'));
85  #$pass->setValue($this->object->getPassword());
86  $pass->setSize(10);
87  $pass->setMaxLength(32);
88  $opt_pass->addSubItem($pass);
89  $reg_type->addOption($opt_pass);
90  }
91 
93  {
94  $opt_req = new ilRadioOption($this->txt('reg_request'), ilMembershipRegistrationSettings::TYPE_REQUEST,$this->txt('reg_request_info'));
95  $reg_type->addOption($opt_req);
96  }
98  {
99  $opt_deact = new ilRadioOption($this->txt('reg_disabled'),ilMembershipRegistrationSettings::TYPE_NONE,$this->txt('reg_disabled_info'));
100  $reg_type->addOption($opt_deact);
101  }
102 
103  // Add to form
104  $form->addItem($reg_type);
105 
107  {
108  // max member
109  $lim = new ilCheckboxInputGUI($this->txt('reg_max_members_short'),'registration_membership_limited');
110  $lim->setValue(1);
111  #$lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
112  #$lim->setChecked($this->object->isMembershipLimited());
113 
114  $max = new ilTextInputGUI($this->txt('reg_max_members'),'registration_max_members');
115  #$max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
116  //$max->setTitle($this->lng->txt('members'));
117  $max->setSize(3);
118  $max->setMaxLength(4);
119  $max->setInfo($this->txt('reg_max_members_info'));
120  $lim->addSubItem($max);
121 
122  $wait = new ilCheckboxInputGUI($this->txt('reg_waiting_list'),'waiting_list');
123  $wait->setValue(1);
124  //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
125  $wait->setInfo($this->txt('reg_waiting_list_info'));
126  #$wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
127  $lim->addSubItem($wait);
128 
129  $form->addItem($lim);
130  }
131 
132  $this->setFormValues($form);
133  }
This class represents an option in a radio group.
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.
$GLOBALS['ct_recipient']
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 138 of file class.ilMembershipRegistrationSettingsGUI.php.

References $GLOBALS, and getCurrentObject().

Referenced by addMembershipFormElements().

139  {
140  $prefix = $this->getCurrentObject()->getType();
141  return $GLOBALS['lng']->txt($prefix.'_'.$a_lang_key);
142  }
$GLOBALS['ct_recipient']
+ 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: