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