xref: /plugin/struct/types/Wiki.php (revision 0549dcc5bc88d4f9d923acdd09931d8d51be7097)
1f7b44d7dSAndreas Gohr<?php
2*d6d97f60SAnna Dabrowska
3ba766201SAndreas Gohrnamespace dokuwiki\plugin\struct\types;
4f7b44d7dSAndreas Gohr
5*d6d97f60SAnna Dabrowskaclass Wiki extends LongText
6*d6d97f60SAnna Dabrowska{
7f7b44d7dSAndreas Gohr    /**
8f7b44d7dSAndreas Gohr     * @param int|string $value
9f7b44d7dSAndreas Gohr     * @param \Doku_Renderer $R
10f7b44d7dSAndreas Gohr     * @param string $mode
11f7b44d7dSAndreas Gohr     * @return bool
12f7b44d7dSAndreas Gohr     */
13*d6d97f60SAnna Dabrowska    public function renderValue($value, \Doku_Renderer $R, $mode)
14*d6d97f60SAnna Dabrowska    {
156822dd25SMichael Große        if ($mode === 'struct_csv') {
166822dd25SMichael Große            $R->doc .= $value;
176822dd25SMichael Große            return true;
186822dd25SMichael Große        }
196822dd25SMichael Große
209ebd2ed6SAndreas Gohr        $value = $this->config['prefix'] . $value . $this->config['postfix'];
21f7b44d7dSAndreas Gohr        $doc = p_render($mode, p_get_instructions($value), $info);
22f7b44d7dSAndreas Gohr        $R->doc .= $doc; // FIXME this probably does not work for all renderers
23f7b44d7dSAndreas Gohr        return true;
24f7b44d7dSAndreas Gohr    }
25f7b44d7dSAndreas Gohr}
26