[TYPO3-dev] problems with the storing of a value...
Walter Seeberger
walk2moon at gmx.de
Tue Mar 24 10:52:39 CET 2009
Hello everybody,
I am using the lib/div libraries and I want to store the value of a variable within the model, but I can't manage to have it persistent:
----------------
class tx_test_models_example extends tx_lib_object {
...
var $testVar;
function tx_test_models_example(){
parent::tx_lib_object();
}
function init(){
$this->prepareData();
}
function prepareData(){
...
$compData = t3lib_div::makeInstance('tx_test_models_example2');
$compData->setCaller($this);
$objData = get_object_vars($compData);
// Implement something cooler than array_slice!!!!
$finished = (array) array_slice($objData,2);
$output = $this->object2array($finished);
$this->testVar = $output['array1']['array2']['Testtext'];
$this->set('Test',$this->testVar);
echo $this->testVar;
}
----------------
In the controller I call the function init(). I can echo $this->testVar; correct. But my view isn't able to have the value of $this->testVar;. I can't find any solution to this problem. Can anyone provide some help? Please...
Thanks Walter
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
More information about the TYPO3-dev
mailing list