[TYPO3] pbsurvey - hook
Dmitry Dulepov [typo3]
dmitry at typo3.org
Wed Aug 6 11:53:23 CEST 2008
Hi!
Henjo Hoeksma wrote:
> I'm trying to use the hook in pbsurvey. I keep ending up with errors like:
>
> Call to a member function hookItemProcessor() on a non-object
>
> and
>
> Cannot re-assign $this
>
> Object oriented thinking obviously isn't my strongest point ;-)
>
> My code so far:
> <code>
> class tx_kopbsurveyext {
>
> function hookItemProcessor($arrItem,$this) {
> $content = "test";
> return $content;
> }
>
> }
> </code>
> Or wtihout $this for the first error...
You can't use $this in the function parameters. It is a reserved word in PHP. Use &$pObj instead.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/typo3_code_formatting_in_eclipse/
More information about the TYPO3-english
mailing list