<?php
+namespace Shaarli\Config;
+
/**
* Plugin configuration helper functions.
*
}
/**
- * Affect plugin parameters values into plugins array.
+ * Affect plugin parameters values from the ConfigManager into plugins array.
*
- * @param mixed $plugins Plugins array ($plugins[<plugin_name>]['parameters']['param_name'] = <value>.
+ * @param mixed $plugins Plugins array:
+ * $plugins[<plugin_name>]['parameters'][<param_name>] = [
+ * 'value' => <value>,
+ * 'desc' => <description>
+ * ]
* @param mixed $conf Plugins configuration.
*
* @return mixed Updated $plugins array.
foreach ($plugin['parameters'] as $key => $param) {
if (!empty($conf[$key])) {
- $out[$name]['parameters'][$key] = $conf[$key];
+ $out[$name]['parameters'][$key]['value'] = $conf[$key];
}
}
}
/**
* Exception used if an error occur while saving plugin configuration.
*/
-class PluginConfigOrderException extends Exception
+class PluginConfigOrderException extends \Exception
{
/**
* Construct exception.