Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Calling global presenter from a module...
I split my app to 3 parts: public as main (global) application, admin and users as modules. In some cases I want to reuse global (common) code in my modules and I use presenters for some parts of template (widgets).
So, when I try to reuse my global widget in admin module:
$presenter = \Presenter::forge('widgets', 'do_lang_switcher', false, 'widgets/lang_switcher');
I've got an error:
Call to undefined method Admin\Presenter_Widgets::do_lang_switcher().
Why global widget called in module namespace context? How to force run it in global namespace?
Can you post the trace at the bottom of the error page, so I can see what triggers the error?
Also, which Fuel version are you on?
COREPATH/bootstrap.php @ line 71
Never mind. I already copied code of 'do_lang_switch()' method to modular widgets class.
Thank you for attention.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion