[TYPO3-project-seminars] Hook modifySingleView

Oliver Klee typo3-german-02 at oliverklee.de
Tue Jul 14 17:34:02 CEST 2009


Hi Ben,

Ben Kerner schrieb:
> my class.tx_ext_hook.php:
> 
> <?php
>  class tx_ext_hook {
>   function modifySingleView($obj){
>    $content = "try1";
>    return $content;
>   }
>  }
> 
>  ?>
> 
> 
> Or isn a output here impossible?

No, output is not possible. This is how the hook gets called in pi1:

// Modifies the single view hook.
foreach ($this->hookObjects as $hookObject) {
	if (method_exists($hookObject, 'modifySingleView')) {
		$hookObject->modifySingleView($this);
	}
}

But you can use the pi1 object that is passed when calling the hook.


Oliver


More information about the TYPO3-project-seminars mailing list