1<?php
2
3namespace dokuwiki\plugin\struct\types;
4
5class Text extends AbstractMultiBaseType
6{
7    use TraitFilterPrefix;
8
9    protected $config = array(
10        'prefix' => '',
11        'postfix' => '',
12    );
13
14    /**
15     * Output the stored data
16     *
17     * @param string|int $value the value stored in the database
18     * @param \Doku_Renderer $R the renderer currently used to render the data
19     * @param string $mode The mode the output is rendered in (eg. XHTML)
20     * @return bool true if $mode could be satisfied
21     */
22    public function renderValue($value, \Doku_Renderer $R, $mode)
23    {
24        $R->cdata($this->config['prefix'] . $value . $this->config['postfix']);
25        return true;
26    }
27}
28