I have tried to get the plugin params
in the component area
, but i didn't get the result.
Is there anyway to get the values.
May this will help you- Read more
JPluginHelper::getPlugin($type, $plugin)
//It will return the plugin
For Example-
$plugin = JPluginHelper::getPlugin('authentication', 'ldap');
//$params = new JParameter($plugin->params);//backward compatibility
$params = new JRegistry($plugin->params);//Joomla 1.6 Onward
echo $params->get('param_name','default_value');
$params
will function like normal JParameter
object and enable you to get values.
Note: Use JRegistry Instead of JParameter
JParameter
was deprecated in Joomla v1.6.x,Joomla v2.5.x & Joomla v3.0.x.. reference
If you want to decode the params value,use JRegistry
instead of JParameter
Example
$plugin = JPluginHelper::getPlugin('system', 'sslredirect');
$params = new JRegistry($plugin->params);
echo $params->get('param_name','default_value');
Deprecation message in parameter.php
// Deprecation warning.
JLog::add('JParameter::__construct is deprecated.', JLog::WARNING, 'deprecated');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With