mirror of
https://github.com/cosmocode/dokuwiki-plugin-struct.git
synced 2025-08-06 10:24:17 +00:00
28 lines
706 B
PHP
28 lines
706 B
PHP
<?php
|
|
|
|
namespace dokuwiki\plugin\struct\types;
|
|
|
|
class Text extends AbstractMultiBaseType
|
|
{
|
|
use TraitFilterPrefix;
|
|
|
|
protected $config = [
|
|
'prefix' => '',
|
|
'postfix' => ''
|
|
];
|
|
|
|
/**
|
|
* Output the stored data
|
|
*
|
|
* @param string|int $value the value stored in the database
|
|
* @param \Doku_Renderer $R the renderer currently used to render the data
|
|
* @param string $mode The mode the output is rendered in (eg. XHTML)
|
|
* @return bool true if $mode could be satisfied
|
|
*/
|
|
public function renderValue($value, \Doku_Renderer $R, $mode)
|
|
{
|
|
$R->cdata($this->config['prefix'] . $value . $this->config['postfix']);
|
|
return true;
|
|
}
|
|
}
|