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