xref: /plugin/struct/types/Text.php (revision 706e7c4b4fb25490b723f162ecf439f6eea4d948)
1<?php
2namespace plugin\struct\types;
3
4use dokuwiki\Form\Form;
5
6class Text extends AbstractBaseType {
7
8    protected $config = array(
9        'prefix' => '',
10        'postfix' => '',
11    );
12
13
14
15
16    /**
17     * Output the stored data
18     *
19     * @param int|string $value
20     * @return string the HTML to represent this data
21     */
22    public function getDisplayData($value) {
23        return hsc($this->config['prefix'] . $value . $this->config['postfix']);
24    }
25
26    /**
27     * Return the editor to edit a single value
28     *
29     * @param string $name the form name where this has to be stored
30     * @param string $value the current value
31     * @return string html
32     */
33    public function valueEditor($name, $value) {
34        // TODO: Implement valueEditor() method.
35    }
36}
37