[TYPO3-english] Problem with extending my extension class

Lars Haendler typo3 at larshaendler.com
Thu Oct 16 18:32:53 CEST 2008


Dmitry Dulepov wrote:
> Hi!
> 
> Lars Haendler wrote:
>> But when I make a new instance of my class $whateverObj = new 
>> whatevernewclass and use a function I get the error
> 
> Firsts, never "new" in TYPO3 but t3lib_div::makeInstance($className).

Old habits but I will try for the future :-)

>> Fatal error: Class 'tx_myextension_pi1' not found in 
>> /var/www/web42/html/typo3conf/ext/myextension/pi1/class.whatevernewclass.php 
> 
> 
> Not TYPO3–specific ;) You forgot to include your class in the PHP file.

hmpf ... embarrassing for me ... thanx

> require_once(t3lib_extMgm::extPath('myextension', 
> 'pi1/class.tx_myextension_pi1.php'));
> 
> Buy my book about extension development ;)
> 

I already did but I'm lazy when it comes to reading the whole book.

Thanx
Lars



More information about the TYPO3-english mailing list