ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSessionMembershipRegistrationSettingsGUI.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.ilMembershipRegistrationSettingsGUI.php';
5 
16 {
23  public function __construct(ilObjectGUI $gui_object, ilObject $object, $a_options)
24  {
25  parent::__construct($gui_object, $object, $a_options);
26  $GLOBALS['DIC']['lng']->loadLanguageModule('sess');
27  }
28 
29  public function setFormValues(ilPropertyFormGUI $form)
30  {
31  $form->getItemByPostVar('registration_type')->setValue($this->getCurrentObject()->getRegistrationType());
32 
33  if ($this->getCurrentObject()->isCannotParticipateOptionEnabled()) {
34  $form->getItemByPostVar('show_cannot_participate_direct')->setChecked(true);
35  $form->getItemByPostVar('show_cannot_participate_request')->setChecked(true);
36  }
37 
38 
39  $form->getItemByPostVar('registration_membership_limited')->setChecked($this->getCurrentObject()->isRegistrationUserLimitEnabled());
40 
41  $notificationCheckBox = $form->getItemByPostVar('registration_notification');
42  $notificationCheckBox->setChecked($this->getCurrentObject()->isRegistrationNotificationEnabled());
43 
44  $notificationOption = $form->getItemByPostVar('notification_option');
45  $notificationOption->setValue($this->getCurrentObject()->getRegistrationNotificationOption());
46  /* not supported yet
47  $form->getItemByPostVar('registration_min_members')->setValue(
48  $this->getCurrentObject()->getRegistrationMinUsers() > 0 ?
49  $this->getCurrentObject()->getRegistrationMinUsers() : "");
50  */
51 
52  $form->getItemByPostVar('registration_max_members')->setValue(
53  $this->getCurrentObject()->getRegistrationMaxUsers() > 0 ?
54  $this->getCurrentObject()->getRegistrationMaxUsers() : ""
55  );
56 
57  $wait = 0;
58  if ($this->getCurrentObject()->hasWaitingListAutoFill()) {
59  $wait = 2;
60  } elseif ($this->getCurrentObject()->isRegistrationWaitingListEnabled()) {
61  $wait = 1;
62  }
63  $form->getItemByPostVar('waiting_list')->setValue($wait);
64  }
65 }
getItemByPostVar($a_post_var)
Get Item by POST variable.
This class represents a property form user interface.
Class ilObjectGUI Basic methods of all Output classes.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
__construct(Container $dic, ilPlugin $plugin)
__construct(ilObjectGUI $gui_object, ilObject $object, $a_options)
Overwitten to load language module.