[TYPO3-dev] Extend class in extension's creation
Hraklis Karvasonis
Hkarvasonis at customit.com
Tue Sep 26 17:19:37 CEST 2006
Hi.
I am creating a new extension from kickstarter that has a standard class
file like class.myextension.php
i would like to extend this class in another class file, for example
class.mynewclass.php, within the extension, but i receive some errors
when doing that.
i cannot include the class.myextension.php in the new class.
when i write
require_once(t3lib_extMgm::extPath('myextension').'class.myextension.php');
in the new class i receive an error that it cannot find this class.
What i am trying to do is to add a new insert query in the new class
file like this:
$GLOBALS['TYPO3_DB']->exec_INSERTquery('myextension',$field_values);
which libraries do i have to include in the new class in order to do
this? Because i tried to add several libraries there and i always
receive the message that it cannot find this class.
i am also adding at the bottom of the new class file the following lines:
if (defined('TYPO3_MODE') &&
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/myextension/pi1/class.mynewclass.php'])
{include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/myextension/pi1/class.mynewclass.php']);
}
Can you give me any help on how to do this?
Thanks.
More information about the TYPO3-dev
mailing list