Danke für die schnelle Antwort. Ich habe zum Test nun folgendes versucht:
config.php
PHP-Code:
$GLOBALS['TL_HOOKS']['getPageIdFromUrl'][] = array('MeinBundle\Hooks\GetPageIdFromUrl', 'getPageIdFromUrl');
MeinBundle/src/Resources/contao/hooks/GetPageIdFromUrl.php
PHP-Code:
<?php
namespace MeinBundle\Hooks;
class GetPageIdFromUrl
{
public function getPageIdFromUrl($arrFragments)
{
return $arrFragments;
}
}
Und erhalte im Debugger folgende Fehlermeldung:
PHP-Code:
Uncaught PHP Exception ErrorException: "Warning: in_array() expects parameter 2 to be array, null given" at /var/www/kunde/htdocs/contao44/vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php line 223
{
"exception": {}
}
Was könnte das Problem sein?
Lesezeichen