How to overwrite A flexform of repository extension in to the Site Package in order to change the configuration

922 Views Asked by At

Are there any docs that can help me to overwrite the Flexform of powermail extension into my site package? So that I can edit the field configuration.

Please help, I have been searching for this very long.

Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

in ext_localconf.php

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'][] = \ABC\MyPackage\Hooks\OverwriteFlexForm::class . '->overwrite';

In OverwriteFlexForm.php:

    <?php
declare(strict_types=1);
namespace ABC\MyPackage\Hooks;

/**
 * Class OverwriteFlexForm
 */
class OverwriteFlexForm
{

    /**
     * @var string
     */
    protected $path = 'FILE:EXT:my_package/Configuration/FlexForms/FlexformStudyfinderList.xml';

    /**
     * @return void
     */
    public function overwrite()
    {
        $GLOBALS['TCA']['tt_content']['columns']['pi_flexform']['config']['ds']['powermail_pi1,list']
            = $this->path;
    }
}

In FlexformStudyfinderList.xml:

Flexform Code goes here.

Finally, I have found the solution myself. Thanks, everyone for your support.