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 public function update($input) 14 { 15 return true; 16 } 17 18 19 /** @inheritdoc */ 20 public function html(\admin_plugin_config $plugin, $echo = false) 21 { 22 /** @var \helper_plugin_oauth $hlp */ 23 $hlp = plugin_load('helper', 'oauth'); 24 25 $key = htmlspecialchars($this->key); 26 $value = '<code>' . $hlp->redirectURI() . '</code>'; 27 28 $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; 29 $input = '<div>' . $value . '</div>'; 30 return [$label, $input]; 31 } 32} 33