From: Matthias Schmidt Date: Fri, 13 Jul 2018 07:02:35 +0000 (+0200) Subject: Add missing documentation X-Git-Tag: 5.2.0_Alpha_1~680^2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=acfcd7a572d190b6d798b3153282065964c6208f;p=GitHub%2FWoltLab%2FWCF.git Add missing documentation See #2509 --- diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php index 6dbf415b4a..c809bf99a2 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php @@ -23,6 +23,7 @@ trait TSelectionFormField { protected $__filterable = false; /** + * structured options array used to generate the form field output * @var null|array */ protected $__nestedOptions; @@ -47,6 +48,14 @@ trait TSelectionFormField { return $this; } + /** + * Returns a structured array that can be used to generate the form field output. + * + * Array elements are `value`, `label`, and `depth`. + * + * @return array + * @throws \BadMethodCallException if nested options are not supported + */ public function getNestedOptions(): array { if (!$this->supportsNestedOptions()) { throw new \BadMethodCallException("Nested options are not supported.");