Now I am no longer sit in a train, so I can write a bit more:

Normaly you used in your inject*-Functions phps typehinting, so you must extend 
from the original class or interface.

When it is a controller you have to extend from 
"Tx_Extbase_MVC_Controller_ActionController", i don't know if extbase DI system 
checks if the overwritten controller class is an instance of the original one…


Am 15.12.2011 um 20:21 schrieb Lars Patrick Heß:

> Both of them is possible, but if you want change a functionality you have to 
> extend from the original one :-)
> 
> Am 15.12.2011 um 20:13 schrieb Alexander Dick:
> 
>> Aaaah - cool thanks! :-)
>> 
>> And how does the new class have to be defined?
>> 
>> class Tx_MyExt_Controller_OtherController {
>> 
>> or
>> 
>> class Tx_MyExt_Controller_OtherController extends 
>> Tx_FooExt_Controller_OriginalController {
>> 
>> }
>> 
>> thanks
>> Alex
>> 
>> Am 15.12.2011 20:10, schrieb Lars Patrick Heß:
>>> You have to use the DependencyInjection system, you can do something like 
>>> this in your typoscript configuration to override controllers etc.:
>>> 
>>> config.tx_extbase {
>>>     objects {
>>>             Tx_FooExt_Controller_OriginalController.className = 
>>> Tx_MyExt_Controller_OtherController
>>>     }
>>> }
>>> 
>>> :-)
>>> 
>>> Am 15.12.2011 um 20:03 schrieb Alexander Dick:
>>> 
>>>> Hi List,
>>>> 
>>>> is there any way how one can extend/override an Extbase Class, like the 
>>>> traditional XCLASS functionality? Didn't find anything yet.
>>>> 
>>>> best regards
>>>> Alex
>>>> _______________________________________________
>>>> TYPO3-english mailing list
>>>> TYPO3-english@lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>>> 
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english@lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
> 

_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Reply via email to