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 * Adds the admin schema editor to the given form 15 * 16 * @param Form $form 17 * @return void 18 */ 19 public function schemaEditor(Form $form) { 20 // TODO: Implement schemaEditor() method. 21 } 22 23 /** 24 * Adds the frontend editor to the given form 25 * 26 * @param Form $form 27 * @return void 28 */ 29 public function frontendEditor(Form $form) { 30 // TODO: Implement frontendEditor() method. 31 } 32 33 /** 34 * Output the stored data 35 * 36 * @param int|string $value 37 * @return string the HTML to represent this data 38 */ 39 public function getDisplayData($value) { 40 return hsc($this->config['prefix'] . $value . $this->config['postfix']); 41 } 42} 43