mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 11:04:02 +02:00
New plugin: Configure options by end-users and store them to a cookie
This commit is contained in:
@@ -300,6 +300,13 @@ class Adminer {
|
||||
return $val;
|
||||
}
|
||||
|
||||
/** Get configuration options for AdminerConfig
|
||||
* @return string[] key is config description, value is HTML
|
||||
*/
|
||||
function config(): array {
|
||||
return array();
|
||||
}
|
||||
|
||||
/** Print table structure in tabular format
|
||||
* @param Field[] $fields
|
||||
* @param TableStatus $tableStatus
|
||||
|
@@ -100,7 +100,7 @@ function html_select(string $name, array $options, ?string $value = "", string $
|
||||
/** Generate HTML radio list
|
||||
* @param string[] $options
|
||||
*/
|
||||
function html_radios(string $name, array $options, string $value = ""): string {
|
||||
function html_radios(string $name, array $options, ?string $value = ""): string {
|
||||
$return = "";
|
||||
foreach ($options as $key => $val) {
|
||||
$return .= "<label><input type='radio' name='" . h($name) . "' value='" . h($key) . "'" . ($key == $value ? " checked" : "") . ">" . h($val) . "</label>";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
namespace Adminer;
|
||||
|
||||
class Plugins {
|
||||
/** @var true[] */ private static array $append = array('dumpFormat' => true, 'dumpOutput' => true, 'editRowPrint' => true, 'editFunctions' => true); // these hooks expect the value to be appended to the result
|
||||
/** @var true[] */ private static array $append = array('dumpFormat' => true, 'dumpOutput' => true, 'editRowPrint' => true, 'editFunctions' => true, 'config' => true); // these hooks expect the value to be appended to the result
|
||||
|
||||
/** @var list<object> @visibility protected(set) */ public array $plugins;
|
||||
/** @visibility protected(set) */ public string $error = ''; // HTML
|
||||
|
Reference in New Issue
Block a user