1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Getting list of installed add-ons without additional query

Discussion in 'XenForo Development Discussions' started by Jake B., Jul 23, 2015.

  1. Jake B.

    Jake B. Well-Known Member

    I need to get an array of all installed Add-ons, I know this is already loaded so I don't want to create an additional unnecessary query. I also know that I can get it using the init_dependencies code event but would rather not create unnecessary listeners on this project as it is a very small and basic add-on for a large client. Just curious if this is available somehow through XenForo_Application or something. I skimmed through XenForo_Application and didn't see anything referencing addon (other than the getDefaultConfig method).

    Any help is of course much appreciated :)
     
  2. batpool52!

    batpool52! Well-Known Member

    XenForo_Application::get('addOns') maybe?
     
    Thomas.B and Jake B. like this.
  3. Jake B.

    Jake B. Well-Known Member

    Yep, that'll work. Thanks!
     
  4. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    Do note that this returns a list of active add-ons... ;)
     
    Thomas.B likes this.

Share This Page