Add missing documentation
authorMatthias Schmidt <gravatronics@live.com>
Fri, 13 Jul 2018 07:02:35 +0000 (09:02 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 13 Jul 2018 07:02:35 +0000 (09:02 +0200)
See #2509

wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php

index 6dbf415b4a2ec5e48f1dd74c458bcc7feaab1529..c809bf99a2bfba4a8a4803502aee78bf0ef5269e 100644 (file)
@@ -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.");