I need to add a variable in a controller that does not come from a form.
Before, in 3.x, I could add variables to the request->data array :
$this->request->data[‘new_var’] = $value;
I tried several ways with getData but was unsuccessful :
$this->request->getData()->new_var = $value;
$this->request->getData(‘new_var’) = $value;
It seems that getData is read only;
How can I do this in 4.x ?