[TYPO3-dev] Howto extend 3rd partxy Extension?

Dirk Ho dirk_studivz at web.de
Mon Mar 2 17:37:01 CET 2015


Hi Jigal,

great response! Thanks a lot. Sounds very easy so far.

I'll read the documentation.

Thanks and best wishes,

Dirk

Am 02.03.2015 um 11:21 schrieb Jigal van Hemert:
> Hi,
>
> On 02/03/2015 00:01, Dirk Ho wrote:
>> before I start coding, I wanted to ask, how best practice is to extend a
>> 3rd party extension - in my case it's Powermail2.
>
> In TYPO3 is a mechanism called XCLASS [1] which allows you to extend an
> existing class (and effectively replace one or more of its functions).
> The extended class is automatically used instead of the existing class.
>
> As explained in the documentation the safest option is if you can call
> the original method (call parent::functionName(); ) at some point in
> your extended version of the function. That way the original is used
> also after updating the extension.
>
>> Because I use powermail2 not only for a membership form, but also for a
>> contact form, I need the possibility to set a flag, whether to use the
>> new functionality or not.
>
> You can always use an extra option somewhere in the 'settings' section
> of the powermail TypoScript configuration and check your new setting in
> your own code. Your XCLASS-code runs in the context of the original
> powermail code, so you can easily access the powermail settings.
>
> [1]
> http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Xclasses/Index.html
>
>




More information about the TYPO3-dev mailing list