[TYPO3-english] extension developement and stdWrap

Dmitry Dulepov dmitry at typo3.org
Thu Jan 22 15:15:21 CET 2009


Hi again!

Dmitry Dulepov wrote:
> You should not override $this->cObj->data because it contains data belonging to the current object. You should create a new instance of the object:
> 
> $cObj = t3lib_div::makeInstance('tslib_cObj');
> $cObj->start($data);

And if $data is a row from the database, you can supply a table name as the second parameter to the $cObj->start() call. This will initialize some internal parameters properly. Example:

$cObj->start($row, 'tx_myext_tablename');

-- 
Dmitry Dulepov
TYPO3 core team
"Sometimes they go bad. No one knows why" (Cameron, TSCC, "Dungeons&Dragons")


More information about the TYPO3-english mailing list