Hook processFormData und fehlendes use statement
Hallo,
beim Verwenden des processFormData Hook, bekomme ich folgende Fehlermeldung im Log:
Code:
app.CRITICAL: An exception occurred. {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\ClassNotFoundException(code: 0): Attempted to load class \"FormExtended\" from the global namespace.\nDid you forget a \"use\" statement? at /Applications/MAMP/htdocs/intranet.h-groupnet.com/vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php:171)"} []
Ich habe schon diverse use statements ausprobiert:
PHP-Code:
<?php
namespace Mgnt\MyBundle;
use Contao\Form;
use Contao\Widget;
use Contao\Database;
use Contao\Input;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Patchwork\Utf8;
class FormExtended
{
public function myProcessFormData($arrPost, $arrForm, $arrFiles)
{
echo 'Test';
exit;
}
}
Meine config.php:
PHP-Code:
$GLOBALS['TL_HOOKS']['processFormData'][] = array('FormExtended', 'myProcessFormData');
Ich verwende Contao 4.4 und der Hook ist Bestandteil einer eigenen Erweiterung, die im Order „src“ liegt.
Hat jemand eine Idee?
Gruß
Tina