RE: [coldbox:10878] Inject the ClientStorage Plugin

In the instance of the clientStorage Plugin, the ColdBox DSL builder in WireBox simply asks the controller for the plugin by name. The PluginService creates it if necessary the same way it creates all plugins, which includes passing in a controller reference. If you are manually creating a plugin yourself, you would need to provide any constructor dependencies, but why would you do that?? That’s what getPlugin() is for.

As far as components of your own that have constructor dependencies-- you can map them in the binder and define their dependencies there (like your example) or you can simply use annotation and add the inject attribute to your constructor args and WireBox will attempt to provide them.

Here’s an example from the docs:

Cool makes sense.

Thanks everyone for your help. It turns out I had a typo somewhere in
my code. It is working now as posted.