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

Extend XenForo_ControllerAdmin_Abstract

Discussion in 'XenForo Development Discussions' started by silence, Aug 2, 2013.

  1. silence

    silence Well-Known Member

    How come I can only extend it within the actual class and not using the XF code listener?
     
  2. Nobita.Kun

    Nobita.Kun Well-Known Member

    This is basicly. You can extends
    XenForo_ControllerAdmin_Abstract without listener_extends_class
    Example: Your_Addon extends XenForo_ControllerAdmin_Abstract
     
  3. silence

    silence Well-Known Member

    No I got that, but how come for a ControllerPublic I can extend it using the XF listener, but with ControllerPublic I can't?
     
  4. Nobita.Kun

    Nobita.Kun Well-Known Member

    Your_Addon extends XenForo_ControllerPublic_Abstract
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    Why are you trying to inject a class for all ControllerAdmin classes? Use your listener with a very high priority (lower numbers >= larger numbers) and don't specify a class and just always add to $extend, you'll end up doing what you want.
     
  6. silence

    silence Well-Known Member

    :( okay
     
  7. LennardF1989

    LennardF1989 Member

    Thanks, it's so simply I wouldn't have thought about doing that.
     
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    It's not guaranteed to be first but should work on most cases.
     

Share This Page