Add AbstractFormBuilderForm::$formClassName
authorMatthias Schmidt <gravatronics@live.com>
Sun, 1 Dec 2019 09:37:38 +0000 (10:37 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 1 Dec 2019 09:37:38 +0000 (10:37 +0100)
Close #3111

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

index 1544d95d19abbaa98faa96ac54a231ae945c0204..3647ea1fe4903f39986de02bcf7897e3ac9f1395 100644 (file)
@@ -25,6 +25,12 @@ abstract class AbstractFormBuilderForm extends AbstractForm {
         * @var IFormDocument
         */
        public $form;
+
+       /**
+        * name of the form document class
+        * @var string
+        */
+       public $formClassName = FormDocument::class;
        
        /**
         * action performed by the form
@@ -90,7 +96,7 @@ abstract class AbstractFormBuilderForm extends AbstractForm {
                $classNamePieces = explode('\\', get_class($this));
                $controller = preg_replace('~Form$~', '', end($classNamePieces));
                
-               $this->form = FormDocument::create(lcfirst($controller));
+               $this->form = $this->formClassName::create(lcfirst($controller));
                
                if ($this->formObject !== null) {
                        $this->form->formMode(IFormDocument::FORM_MODE_UPDATE);