xref: /plugin/struct/types/Page.php (revision 6af24d3eff33249280549e60e18474e2cc0bf9d0)
1<?php
2namespace plugin\struct\types;
3
4use dokuwiki\Form\Form;
5
6/**
7 * Class Page
8 *
9 * Represents a single page in the wiki. Will be linked in output.
10 *
11 * @package plugin\struct\types
12 */
13class Page extends Text {
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        $link = cleanID($this->config['prefix'] . $value . $this->config['postfix']);
25        if(!$link) return true;
26
27        $R->internallink(":$link");
28        return true;
29    }
30
31}
32