[TYPO3-dev] Powermail and SignalSlot isValid

Alexander Bigga linux at bigga.de
Tue Jun 25 10:09:29 CEST 2013


Dear Gianluca,

Am 25.06.2013 09:41, schrieb Gianluca Strafella:

> I use Powermail(version 2.0.4) and I have implemented a custom PHP
> Validator using the SignalSlot "isValid" in
> Tx_Powermail_Domain_Validator_CustomValidator.

I tried this some time ago. By the way: you should update Powermail to 
2.0.7! There is a security bugfix.

> public function customIsValid($params, $obj) {
>      //(...)
>      $obj->isValid = false;
>      $obj->setError($msg, $fieldId);
> }

Correct. The setError() from powermail executes the extbase addError(). 
Inside the fluid template, your message will be translated if the 
"$msg"-key exists in powermail.

Have a look here:

powermail/Classes/Domain/Validator/CustomValidator.php
powermail/Resources/Private/Partials/FormError.html

So you could take the Partials (and maybe all Templates and Layouts) to 
your fileadmin-directory and modify it for your needs.

Or maybe it's also possible to overwrite / append the locallang.xml 
file? Here you find the language labels for the powermail validation errors:

powermail/Resources/Private/Language/locallang.xml


Maybe this helps you a step forward.

Best regards,

Alexander



More information about the TYPO3-dev mailing list