Actions
Bug #70008
closedextbase use of class variables don't work
Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-09-21
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
I try to build a BE extension with only one view but different action controllers.
To access the view from any any action controller I use:
$this->view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:hgaxlfedit/Resources/Private/Templates/Edit/init.html'));
This works, but the current action controller ist only responcible for a part of the view. If the view will be rendered, only the values from the current controller are updated, the other values are gone.
Therefore I change my concept and defined class variables for the action controller ( e.g. $Temp). The specific action controller should only modifing the class variables and on the end redirect to the central view, which has the only task to assign all varibles to the view.
But this is not working!
If I define $Temp
/** * Temp String * * @var String */ private $Temp ='Init';
in the class, I can read the value from every action controller, but if I do
$this->Temp = "Test Var";
and I read $this->Temp in the same controller I get the modified value 'Test Var'.
But if I try do read $this->Temp in another action controller, e. g. from my main view, I get the value 'init' again.
It seem to me, that the action controller only writes the data to a copy of the class variable $Temp, but not to the class variable itself.
This looks for me as a bug!
Files
Actions