In the main Plugin.php file of my plugin, I can retrieve the plugin's settings like this:


How do I retrieve those same settings from elsewhere in the plugin?

I want to reference those setting from my Service.php file.



| improve this answer | |

In addition to Ben Parizek answer, here is a full example code to get value of a "foo" setting from a "bar" plugin, using magic get methods.

$pluginSettings = craft()->plugins->getPlugin('bar')->getSettings();
$foo = $pluginSettings->foo;
| improve this answer | |
  • Where the magic exists, it's worth using... Thanks! – Lindsey D Jun 29 '14 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.