xref: /dokuwiki/inc/Form/HTMLElement.php (revision 9d01c1d91a93cf50f37d1486481a6493e98be821)
1de19515fSAndreas Gohr<?php
2*9d01c1d9SSatoshi Sahara
3de19515fSAndreas Gohrnamespace dokuwiki\Form;
4de19515fSAndreas Gohr
5de19515fSAndreas Gohr/**
6de19515fSAndreas Gohr * Class HTMLElement
7de19515fSAndreas Gohr *
8de19515fSAndreas Gohr * Holds arbitrary HTML that is added as is to the Form
9de19515fSAndreas Gohr *
10de19515fSAndreas Gohr * @package dokuwiki\Form
11de19515fSAndreas Gohr */
12*9d01c1d9SSatoshi Saharaclass HTMLElement extends ValueElement
13*9d01c1d9SSatoshi Sahara{
14de19515fSAndreas Gohr    /**
15de19515fSAndreas Gohr     * @param string $html
16de19515fSAndreas Gohr     */
17*9d01c1d9SSatoshi Sahara    public function __construct($html)
18*9d01c1d9SSatoshi Sahara    {
1964744a10SAndreas Gohr        parent::__construct('html', $html);
20de19515fSAndreas Gohr    }
21de19515fSAndreas Gohr
22de19515fSAndreas Gohr    /**
23de19515fSAndreas Gohr     * The HTML representation of this element
24de19515fSAndreas Gohr     *
25de19515fSAndreas Gohr     * @return string
26de19515fSAndreas Gohr     */
27*9d01c1d9SSatoshi Sahara    public function toHTML()
28*9d01c1d9SSatoshi Sahara    {
29de19515fSAndreas Gohr        return $this->val();
30de19515fSAndreas Gohr    }
31de19515fSAndreas Gohr}
32