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