I would like to use another plugin from my own plugin. What is the best way to do this. Right now I am doing something like this, but there should be a better way than to explicitly call the service:


What I am really looking for is the service container where I do not have to know anything just the plugin what should have been loaded...?


You can call the main plugin class directly


I don't know this plugin, maybe the class is wrong but that's the syntax you can use

  • Got it, and it will be the same instance I guess right? The "last" thing what I bother to call the service it self ->mobileDetectService... There should be a better way I mean is there any service container what I can call instead? May 14 '18 at 19:57
  • You instance of the plugin is your service container. Services are components and they are registered in your (singleton) plugin instance. I'm not really sure what you mean by "better" way. May 14 '18 at 20:03

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.