diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /lib/classes/forms/Input.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/classes/forms/Input.php')
| -rw-r--r-- | lib/classes/forms/Input.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/classes/forms/Input.php b/lib/classes/forms/Input.php index 9d2ad32..ef506e9 100644 --- a/lib/classes/forms/Input.php +++ b/lib/classes/forms/Input.php @@ -150,12 +150,17 @@ abstract class Input } /** - * Returns the value of this input. - * @return null + * Returns the value of this input. If $this->value is a callable this->getValue() returns the computed result. + * @return mixed */ public function getValue() { - return $this->value; + if (is_callable($this->value)) { + $callable = $this->value; + return $callable(); + } else { + return $this->value; + } } /** |
