AddonsLab
Well-known member
- Affected version
- 2.x
Hello,
when adding an event listener for
Checking the context in which the event is fired we see it actually gets an instance of
Thank you!
when adding an event listener for
inline_mod_actions
the documentation says, that as a second argument for the listener will be passed an instance of \XF\Pub\App
This seems to be natural choice considering the system is used on the front-end by XenForo itself, but as it is a very nicely organized abstraction of all inline moderation actions we use it in the back-end code as well. As a result, our add-on causes an error if some other add-ons register a listener for inline_mod_actions
actions because an instance of \XF\Admin\App is being passed to the listener in this case.Checking the context in which the event is fired we see it actually gets an instance of
\XF\App
at \XF\InlineMod\AbstractHandler::__construct
so it seems the requirement for an instance of \XF\Pub\App
is just in the documentation but is not needed at the runtime. Please confirm if it can be updated or if there is any reason why the system cannot be used in back-end code.Thank you!