Build form after reading request parameters
authorMatthias Schmidt <gravatronics@live.com>
Thu, 24 May 2018 15:25:07 +0000 (17:25 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 24 May 2018 15:25:07 +0000 (17:25 +0200)
This allows the form building process to access the request parameters so that request parameter-dependencies of the form can be resolved direcly while building the form and do not have to be delated until later.

See #2509

wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php

index cc913b327f7a412bda60e0b461156cad040be8f7..fb6694192048f2d482548da1122028b78887aec6 100644 (file)
@@ -45,15 +45,6 @@ abstract class AbstractFormBuilderForm extends AbstractForm {
         */
        public $objectActionClass;
        
-       /**
-        * @inheritDoc
-        */
-       public function __run() {
-               $this->buildForm();
-               
-               parent::__run();
-       }
-       
        /**
         * @inheritDoc
         */
@@ -170,6 +161,15 @@ abstract class AbstractFormBuilderForm extends AbstractForm {
                $this->form->action(LinkHandler::getInstance()->getLink($controller, $parameters));
        }
        
+       /**
+        * @inheritDoc
+        */
+       public function show() {
+               $this->buildForm();
+               
+               return parent::show();
+       }
+       
        /**
         * @inheritDoc
         */