ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDclCheckboxInputGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public function checkInput(): bool
24 {
25 $has_postvar = $this->http->wrapper()->post()->has($this->getPostVar());
26 if ($this->getRequired() && !$has_postvar) {
27 global $DIC;
28 $lng = $DIC['lng'];
29 $this->setAlert($lng->txt("msg_input_is_required"));
30
31 return false;
32 }
33
34 return parent::checkInput();
35 }
36}
This class represents a checkbox property in a property form.
checkInput()
Check input, strip slashes etc.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26