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

XenForo_View Instance from anywhere

Discussion in 'XenForo Development Discussions' started by vbresults, Oct 27, 2015.

  1. vbresults

    vbresults Well-Known Member

    Is there an instance of XenForo_View for the current request that is accessible from anywhere in an add-on, specifically in places where no view variable is supplied? I know some might say that it is probably being used in the wrong place, but it is not, this is for a special case that requires me to load a helper which itself requires a XenForo_View instance.

    I can spin up a new instance of 5 classes to arrive at a new XenForo_ViewPublic_Base, but if there's an option to do it as a one-liner, I'm all for it.
     

Share This Page