From: Matthias Schmidt Date: Sat, 13 Apr 2019 10:54:34 +0000 (+0200) Subject: Add `CustomFormNode` X-Git-Tag: 5.2.0_Alpha_1~148 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e71df1bb7078c73639f77193658d4e1415cad8ce;p=GitHub%2FWoltLab%2FWCF.git Add `CustomFormNode` See #2509 --- diff --git a/wcfsetup/install/files/lib/system/form/builder/CustomFormNode.class.php b/wcfsetup/install/files/lib/system/form/builder/CustomFormNode.class.php new file mode 100644 index 0000000000..6bd0c5d248 --- /dev/null +++ b/wcfsetup/install/files/lib/system/form/builder/CustomFormNode.class.php @@ -0,0 +1,59 @@ + + * @package WoltLabSuite\Core\System\Form\Builder + * @since 5.2 + */ +class CustomFormNode implements IFormChildNode { + use TFormChildNode; + use TFormNode; + + /** + * content of the custom form node + * @var string + */ + protected $content = ''; + + /** + * Sets the content of this form node and returns this form node. + * + * @param string $content + * @return static this form node + */ + public function content($content) { + $this->content = $content; + + return $this; + } + + /** + * Returns the content of the custom form node. + * + * @return string + */ + public function getContent() { + return $this->content; + } + + /** + * @inheritDoc + */ + public function getHtml() { + return $this->getContent(); + } + + /** + * @inheritDoc + */ + public function validate() { + // does nothing + } +}