ILIAS  release_7 Revision v7.30-3-g800a261c036
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
4include_once './Services/Membership/classes/class.ilMembershipRegistrationSettingsGUI.php';
5
16{
23 public function __construct(ilObjectGUI $gui_object, ilObject $object, $a_options)
24 {
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}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
An exception for terminatinating execution or to throw for unit testing.
Class ilObjectGUI Basic methods of all Output classes.
Class ilObject Basic functions for all objects.
This class represents a property form user interface.
getItemByPostVar($a_post_var)
Get Item by POST variable.
__construct(ilObjectGUI $gui_object, ilObject $object, $a_options)
Overwitten to load language module.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc