Skip to content

Help - Multimodule communication #1

@tomdzon

Description

@tomdzon

Hi,

Can you please give me an example of multi module application and inter-module communication. I don't know if this is possible, but I presume it is because you said something like that in last passus of your readme.md file. But, I'm curious, is it possible to... For example, can I visit route /shop/ [module "shop", controller index and action index] and in that indexAction, can I somehow:

$this->flash->notice("Going to widget module");
// Forward flow to another module
$weather = $this->dispatcher->forward(array(
     "module"   => "widget"
     "controller" => "weather",
     "action" => "currentWeather"
));

and in "widget" module [controller weather, action currentWeather] to output html page with this flash notice from "shop" module.

And one more example, if you can explain me how to pass variable to (or get variable from) another module?
How can I fetch some data/variables from "widget" module if I'm in "shop" module?!

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions