0

In a module I use forms. On special occasions I have to start another form in another module. In this case I would like to do the following: 1 pass the control from the form to the Controller(1) of the module 2 this Controller(1) should then pass the control to the Controller(2) of the other module 3 this Controller(2) should start the desired form

Step 1 and 3 I can perform

Step 2 is still a problem because I read that a controller always must render output. I do not want to create a new instance of Controller 2 in Controller 1.

Found out that you can return a redirect to another controller. The parameter handling is not yet clear to me, I cannot find a good tutorial about the usage ofRedirect and passing parameters with it.

  • Are you looking for multistep form or something similar? If yes, refer this link. – Yogesh Dec 15 '16 at 6:53
0

My aim is the implementation of a Mediator Pattern. Best practice to do this is using the Event Dispatcher Mechanism. This is explained here.

A good example of implementing the mechanism, even create your own event type (above the existing types of Drupal) is described here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.