I have a module names mymodone , i want to load and execute method (action) mymethodone of that module and get output html, how i can do that? is there any thing like module::run('modulename/....') ?
Calling code cross-context is a bad thing to do, as it will destroy any loose coupling between components.
You call a controller using an HMVC call:
try { // assuming the method called returns HTML $html = \Request::forge('mymodone/controllername/mymethodone')->execute()->response()->body(); } catch (\HttpNotFoundException $e) { // the requested route does not exist }
which uses routing to decouple caller and callee. This way you can route the request to another action without changing any code, rename or remove the module, and your app will continue to work.
i want to create some widgets, small applications such 'site state' , 'login or user info' , 'fast contact us' ,... this widgets are complete but small modules, what is best way to implement this?