Ygg69
Ygg69

Reputation: 261

Symfony passing request to function to an other controller

I try to give '$_REQUEST['vider']' to an other controller like this :

return $this->forward('TestBundle:Rapport:bo', array('vider' => 'vider'));
//, array ($_REQUEST['vider'] => 'vider) doesn't work too

But in my function Rapport:bo, $_REQUEST['vider'] is null, i give it in the array, where i failed ?

edit : my Rapport:bo function :

public function boAction(Request $request) {
var_dump($_REQUEST['vider']); // is null
if ( isset($_REQUEST['vider']) ) ) {
        var_dump('test');
    }

}

Upvotes: 0

Views: 284

Answers (1)

Daniele Dolci
Daniele Dolci

Reputation: 884

Try with:

public function boAction($vider) {
    your logic... 

Upvotes: 1

Related Questions