ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSessionMembershipRegistrationSettingsGUI.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
32 {
33  public function __construct(ilObjectGUI $gui_object, ilObject $object, array $a_options)
34  {
35  parent::__construct($gui_object, $object, $a_options);
36  $this->lng->loadLanguageModule('sess');
37  }
38 
39  public function setFormValues(ilPropertyFormGUI $form): void
40  {
41  $form->getItemByPostVar('registration_type')->setValue((string) $this->getCurrentObject()->getRegistrationType());
42 
43  if ($this->getCurrentObject()->isCannotParticipateOptionEnabled()) {
44  $form->getItemByPostVar('show_cannot_participate_direct')->setChecked(true);
45  $form->getItemByPostVar('show_cannot_participate_request')->setChecked(true);
46  }
47  $form->getItemByPostVar('registration_membership_limited')->setChecked((bool) $this->getCurrentObject()->isRegistrationUserLimitEnabled());
48 
49  $notificationCheckBox = $form->getItemByPostVar('registration_notification');
50  $notificationCheckBox->setChecked($this->getCurrentObject()->isRegistrationNotificationEnabled());
51 
52  $notificationOption = $form->getItemByPostVar('notification_option');
53  $notificationOption->setValue($this->getCurrentObject()->getRegistrationNotificationOption());
54  $form->getItemByPostVar('registration_max_members')->setValue(
55  $this->getCurrentObject()->getRegistrationMaxUsers() > 0 ?
56  (string) $this->getCurrentObject()->getRegistrationMaxUsers() : ""
57  );
58 
59  $wait = 0;
60  if ($this->getCurrentObject()->hasWaitingListAutoFill()) {
61  $wait = 2;
62  } elseif ($this->getCurrentObject()->isRegistrationWaitingListEnabled()) {
63  $wait = 1;
64  }
65  $form->getItemByPostVar('waiting_list')->setValue((string) $wait);
66  }
67 }
getItemByPostVar(string $a_post_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjectGUI $gui_object, ilObject $object, array $a_options)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjectGUI Basic methods of all Output classes.
__construct(Container $dic, ilPlugin $plugin)