[TYPO3-mvc] extending news

Sebastian Schreiber me at schreibersebastian.de
Tue Nov 15 12:37:32 CET 2011


Am 15.11.2011 11:17, schrieb Henjo Hoeksma:
> On Tue, Nov 15, 2011 at 06:46, Georg Ringer<typo3 at ringerge.org>  wrote:
>
>> Am 14.11.2011 21:56, schrieb Henjo Hoeksma:
>>
>>   Hi Stefan,
>>> the cleanest solution would be - and I do not know another way - to create
>>> your own extension which extends the news extension.
>>>
>> true but the problem that I see that it is not possible to have then some
>> exts in TER which extend the same extension because everyone would do it
>> standalone.
>>
>> as extending with fields is the most common practice a simple example how
>> this could be done with injecting or whatever is needed and if this is not
>> currently possible there is a need to develop this.
> That would be a really cool thing to have!
>
>>
>> georg
>>
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
What do you think of implementing the magic __call method in every model?
This could be part of the Tx_Extbase_DomainObject_AbstractDomainObject 
class itself.
If we would like to extend some models with new getter- and 
setter-methods we could
attach our new model to this event.
If we would call a getter-Method which does not exists in the original 
model, the __call Method is
called and is going to check if another model is listening to this event.

You can read more on: 
http://symfony.com/doc/current/cookbook/event_dispatcher/class_extension.html

I already did a proof of concept with the old EventDispatcher from 
symfony for one of my extensions.

I don´t think it is possible to use the current SignalSlot-Class for 
this approach. Or am i wrong?

What do you think about it?

PS: This could also be possible for properties with the __get and __set 
magic method.



-- 
Sebastian Schreiber
(Medieninformatiker B.Sc.)
(TYPO3 Certified Integrator)

Schanzenstraße 27, Schlosserei 4
D-51063 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 217 / 5269 / 4675



More information about the TYPO3-project-typo3v4mvc mailing list