From: Matthias Schmidt Date: Sun, 1 Dec 2019 09:37:38 +0000 (+0100) Subject: Add AbstractFormBuilderForm::$formClassName X-Git-Tag: 5.2.0_Beta_4~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c57d105d6753f435342e01ccb6e4ab14e10dca6d;p=GitHub%2FWoltLab%2FWCF.git Add AbstractFormBuilderForm::$formClassName Close #3111 --- diff --git a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php index 1544d95d19..3647ea1fe4 100644 --- a/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php +++ b/wcfsetup/install/files/lib/form/AbstractFormBuilderForm.class.php @@ -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);