diff --git a/inc/Form/DropdownElement.php b/inc/Form/DropdownElement.php index 54e865d86af5795b48124e477c9cd468e1a07597..e70a06deebbf8ca0489fbee15c978906f17879a2 100644 --- a/inc/Form/DropdownElement.php +++ b/inc/Form/DropdownElement.php @@ -165,7 +165,7 @@ class DropdownElement extends InputElement { $value_exists = false; /** @var OptGroup $optGroup */ foreach (array_merge(array($this->options), $this->optGroups) as $optGroup) { - $value_exists = $optGroup->setValue($value) || $value_exists; + $value_exists = $optGroup->storeValue($value) || $value_exists; if ($value_exists) { $value = null; } diff --git a/inc/Form/OptGroup.php b/inc/Form/OptGroup.php index ae8b8180f6f838cb4af02fb6484e1cb4b93c06e1..e7160098d630c28c9254d9bd61dedc4a0ae043fc 100644 --- a/inc/Form/OptGroup.php +++ b/inc/Form/OptGroup.php @@ -18,14 +18,14 @@ class OptGroup extends Element { } /** - * Set the element's value + * Store the given value so it can be used during rendering * * This is intended to be only called from within @see DropdownElement::val() * * @param string $value - * @return bool + * @return bool true if an option with the given value exists, false otherwise */ - public function setValue($value) { + public function storeValue($value) { $this->value = $value; return isset($this->options[$value]); }