1<?php 2namespace plugin\struct\types; 3 4use dokuwiki\Form\Form; 5 6class Text extends AbstractBaseType { 7 8 protected $config = array( 9 'prefix' => '', 10 'postfix' => '', 11 ); 12 13 /** 14 * Output the stored data 15 * 16 * @param int|string $value 17 * @return string the HTML to represent this data 18 */ 19 public function getDisplayData($value) { 20 return hsc($this->config['prefix'] . $value . $this->config['postfix']); 21 } 22 23 /** 24 * @param string $name 25 * @param \string[] $values 26 * @return string 27 */ 28 public function multiValueEditor($name, $values) { 29 $value = join(', ', $values); 30 return $this->valueEditor($name, $value); 31 } 32 33} 34