How to send data from controller to controller

Hello guys

Im using yii2 and php presentation to create powerpoint files.

The point is…

I have a ExportController that has data intructions to make data useful for phppresentation. But it also has grafic instructions to create files and download them.

So ExportController is huge bunch of lines because grafic intructions take a lot of code lines.

What I want to do is to split up grafic instructions from data instructions.

How can I send data from actionConsultar (it is ExportController) to actionGenerar (Im planning it to be in GraficsController).

If you know a better way to do this feel free to comment, all suggestions are welcome.

You could do it better by following "fat model, thin controller" concept.

http://www.yiiframework.com/doc-2.0/guide-structure-controllers.html#best-practices

http://www.yiiframework.com/doc-2.0/guide-structure-models.html#best-practices

Consider creating a "Model" class(es) that handles the creation and exporting of your presentation files.