ILIAS  release_8 Revision v8.24
ilTermsOfServiceSettingsFormGUI Class Reference

Class ilTermsOfServiceSettingsFormGUI. More...

+ Inheritance diagram for ilTermsOfServiceSettingsFormGUI:
+ Collaboration diagram for ilTermsOfServiceSettingsFormGUI:

Public Member Functions

 __construct (ilObjTermsOfService $tos, string $formAction='', string $saveCommand='saveSettings', bool $isEditable=false)
 
 setCheckInputCalled (bool $status)
 
 hasTranslatedError ()
 
 getTranslatedError ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Protected Member Functions

 initForm ()
 
 fillObject ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 

Protected Attributes

ilObjTermsOfService $tos
 
string $formAction = ''
 
string $saveCommand = ''
 
bool $isEditable = false
 
string $translatedError = ''
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilTermsOfServiceSettingsFormGUI::__construct ( ilObjTermsOfService  $tos,
string  $formAction = '',
string  $saveCommand = 'saveSettings',
bool  $isEditable = false 
)

Member Function Documentation

◆ fillObject()

ilTermsOfServiceSettingsFormGUI::fillObject ( )
protected

Definition at line 119 of file class.ilTermsOfServiceSettingsFormGUI.php.

119 : bool
120 {
121 if (!$this->checkInput()) {
122 return false;
123 }
124
125 return true;
126 }

References ilPropertyFormGUI\checkInput().

+ Here is the call graph for this function:

◆ getTranslatedError()

ilTermsOfServiceSettingsFormGUI::getTranslatedError ( )

◆ hasTranslatedError()

ilTermsOfServiceSettingsFormGUI::hasTranslatedError ( )

Definition at line 77 of file class.ilTermsOfServiceSettingsFormGUI.php.

77 : bool
78 {
79 return $this->translatedError !== '';
80 }

◆ initForm()

ilTermsOfServiceSettingsFormGUI::initForm ( )
protected

Definition at line 48 of file class.ilTermsOfServiceSettingsFormGUI.php.

48 : void
49 {
50 $this->setTitle($this->lng->txt('tos_tos_settings'));
51 $this->setFormAction($this->formAction);
52
53 $status = new ilCheckboxInputGUI($this->lng->txt('tos_status_enable'), 'tos_status');
54 $status->setValue('1');
55 $status->setChecked($this->tos->getStatus());
56 $status->setInfo($this->lng->txt('tos_status_desc'));
57 $status->setDisabled(!$this->isEditable);
58 $this->addItem($status);
59
60 $reevaluateOnLogin = new ilCheckboxInputGUI($this->lng->txt('tos_reevaluate_on_login'), 'tos_reevaluate_on_login');
61 $reevaluateOnLogin->setValue('1');
62 $reevaluateOnLogin->setChecked($this->tos->shouldReevaluateOnLogin());
63 $reevaluateOnLogin->setInfo($this->lng->txt('tos_reevaluate_on_login_desc'));
64 $reevaluateOnLogin->setDisabled(!$this->isEditable);
65 $status->addSubItem($reevaluateOnLogin);
66
67 if ($this->isEditable) {
68 $this->addCommandButton($this->saveCommand, $this->lng->txt('save'));
69 }
70 }
This class represents a checkbox property in a property form.
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCheckInputCalled()

ilTermsOfServiceSettingsFormGUI::setCheckInputCalled ( bool  $status)

Definition at line 72 of file class.ilTermsOfServiceSettingsFormGUI.php.

72 : void
73 {
74 $this->check_input_called = $status;
75 }

Field Documentation

◆ $formAction

string ilTermsOfServiceSettingsFormGUI::$formAction = ''
protected

Definition at line 27 of file class.ilTermsOfServiceSettingsFormGUI.php.

Referenced by __construct().

◆ $isEditable

bool ilTermsOfServiceSettingsFormGUI::$isEditable = false
protected

Definition at line 29 of file class.ilTermsOfServiceSettingsFormGUI.php.

Referenced by __construct().

◆ $saveCommand

string ilTermsOfServiceSettingsFormGUI::$saveCommand = ''
protected

Definition at line 28 of file class.ilTermsOfServiceSettingsFormGUI.php.

Referenced by __construct().

◆ $tos

ilObjTermsOfService ilTermsOfServiceSettingsFormGUI::$tos
protected

Definition at line 26 of file class.ilTermsOfServiceSettingsFormGUI.php.

Referenced by __construct().

◆ $translatedError

string ilTermsOfServiceSettingsFormGUI::$translatedError = ''
protected

Definition at line 30 of file class.ilTermsOfServiceSettingsFormGUI.php.

Referenced by getTranslatedError().


The documentation for this class was generated from the following file: