ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSessionMembershipRegistrationSettingsGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
31{
32 public function __construct(ilObjectGUI $gui_object, ilObject $object, array $a_options)
33 {
35 $this->lng->loadLanguageModule('sess');
36 }
37
38 public function setFormValues(ilPropertyFormGUI $form): void
39 {
40 $form->getItemByPostVar('registration_type')->setValue((string) $this->getCurrentObject()->getRegistrationType());
41
42 if ($this->getCurrentObject()->isCannotParticipateOptionEnabled()) {
43 $form->getItemByPostVar('show_cannot_participate_direct')->setChecked(true);
44 $form->getItemByPostVar('show_cannot_participate_request')->setChecked(true);
45 }
46 $form->getItemByPostVar('registration_membership_limited')->setChecked((bool) $this->getCurrentObject()->isRegistrationUserLimitEnabled());
47
48 $notificationCheckBox = $form->getItemByPostVar('registration_notification');
49 $notificationCheckBox->setChecked($this->getCurrentObject()->isRegistrationNotificationEnabled());
50
51 $notificationOption = $form->getItemByPostVar('notification_option');
52 $notificationOption->setValue($this->getCurrentObject()->getRegistrationNotificationOption());
53 $form->getItemByPostVar('registration_max_members')->setValue(
54 $this->getCurrentObject()->getRegistrationMaxUsers() > 0 ?
55 (string) $this->getCurrentObject()->getRegistrationMaxUsers() : ""
56 );
57
58 $wait = 0;
59 if ($this->getCurrentObject()->hasWaitingListAutoFill()) {
60 $wait = 2;
61 } elseif ($this->getCurrentObject()->isRegistrationWaitingListEnabled()) {
62 $wait = 1;
63 }
64 $form->getItemByPostVar('waiting_list')->setValue((string) $wait);
65 }
66}
Class ilObjectGUI Basic methods of all Output classes.
Class ilObject Basic functions for all objects.
This class represents a property form user interface.
getItemByPostVar(string $a_post_var)
__construct(ilObjectGUI $gui_object, ilObject $object, array $a_options)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc