1<?php 2 3namespace dokuwiki\plugin\oauth; 4 5use dokuwiki\plugin\config\core\Setting\Setting; 6 7/** 8 * Custom Setting to display the default redirect URL 9 */ 10class RedirectSetting extends Setting { 11 12 /** @inheritdoc */ 13 function update($input) { 14 return true; 15 } 16 17 18 /** @inheritdoc */ 19 public function html(\admin_plugin_config $plugin, $echo = false) 20 { 21 /** @var \helper_plugin_oauth $hlp */ 22 $hlp = plugin_load('helper', 'oauth'); 23 24 $key = htmlspecialchars($this->key); 25 $value = '<code>'.$hlp->redirectURI().'</code>'; 26 27 $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; 28 $input = '<div>'.$value.'</div>'; 29 return array($label, $input); 30 } 31 32} 33