How to instantiate a plugin from another plugin?


Each plugin can have options to setup opinionated defaults so the plugin works out of the box, but some of these options can be altered via config.php to fit the developer better.

Now I’ld like to set some options for the queue-plugin, from another plugin to autopublish pages. This way I’ld like to achieve that the queue plugin gets some options from the autopublish plugin, so that the autopublish plugin can work without the developer having to setup boilerplate options in config.php.

But I can’t get it working. E.g. when I use option("queue.someOption", "someValue") to set queue-options from site/plugins/autopublish/index.php, I can’t use option("queue.someOption"); in e.g. a route as it returns the default value as set in the queue-plugin…