aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/ConfigPlugin.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-08-13 14:48:51 +0200
committerGitHub <noreply@github.com>2016-08-13 14:48:51 +0200
commit8758bb0ac8cb68d32122009dbcb977d2f0fad2b0 (patch)
tree586fe98bd463424e152232cb66bee0465e7c74b5 /application/config/ConfigPlugin.php
parenteec3666ba60b20f1db054102ccbd618d3bb79594 (diff)
parent876533e86801246bef893e7124ce044ebf33239f (diff)
downloadShaarli-8758bb0ac8cb68d32122009dbcb977d2f0fad2b0.tar.gz
Shaarli-8758bb0ac8cb68d32122009dbcb977d2f0fad2b0.tar.zst
Shaarli-8758bb0ac8cb68d32122009dbcb977d2f0fad2b0.zip
Merge pull request #619 from ArthurHoaro/plugins/param-desc
Add a description to plugin parameters
Diffstat (limited to 'application/config/ConfigPlugin.php')
-rw-r--r--application/config/ConfigPlugin.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/application/config/ConfigPlugin.php b/application/config/ConfigPlugin.php
index 047d2b03..cb0b6fce 100644
--- a/application/config/ConfigPlugin.php
+++ b/application/config/ConfigPlugin.php
@@ -80,9 +80,13 @@ function validate_plugin_order($formData)
80} 80}
81 81
82/** 82/**
83 * Affect plugin parameters values into plugins array. 83 * Affect plugin parameters values from the ConfigManager into plugins array.
84 * 84 *
85 * @param mixed $plugins Plugins array ($plugins[<plugin_name>]['parameters']['param_name'] = <value>. 85 * @param mixed $plugins Plugins array:
86 * $plugins[<plugin_name>]['parameters'][<param_name>] = [
87 * 'value' => <value>,
88 * 'desc' => <description>
89 * ]
86 * @param mixed $conf Plugins configuration. 90 * @param mixed $conf Plugins configuration.
87 * 91 *
88 * @return mixed Updated $plugins array. 92 * @return mixed Updated $plugins array.
@@ -97,7 +101,7 @@ function load_plugin_parameter_values($plugins, $conf)
97 101
98 foreach ($plugin['parameters'] as $key => $param) { 102 foreach ($plugin['parameters'] as $key => $param) {
99 if (!empty($conf[$key])) { 103 if (!empty($conf[$key])) {
100 $out[$name]['parameters'][$key] = $conf[$key]; 104 $out[$name]['parameters'][$key]['value'] = $conf[$key];
101 } 105 }
102 } 106 }
103 } 107 }