With the QueryController i ask for $querySCP->text and $querySD->text
I pass those parameters to hte ResultController with $this->request->session...
I try to acces the $querySCP and $querySD in the view.ctp.
I have the following code:
Controller Query:
public function add()
{
$querySCP = $this->Query->newEntity();
$querySD = $this->Query->newEntity();
if ($this->request->is('post')) {
$this->request->session()->write(
'my-stuff',
$this->request->data);
$this->redirect('/result/view');
}
}
Controller Result:
public function view()
{
$myStuff = $this->request->session()->read('my-stuff');
if (!$myStuff) {
$this->Flash->error(__('Unable.'));
return $this->redirect('/start/point');
}
$this->set($myStuff); //here i tried to pass parameters to the view.ctp
}
View view.ctp:
<?php $myStuff->querySCP->text?>
<?php $myStuff->querySD->text?>
How do i access to those parameters? Are they methods of $myStuff? thanks.