The sqlGetFromDB hook is triggered when parsing the current database
definition. It passes the generated SQL definitions and expects the same
as return value.
Parameters
array$sql
The compiled SQL definitions.
Return Values
Return $sql after adding your custom definitions.
Example
// src/EventListener/SqlGetFromDBListener.php
namespaceApp\EventListener;useContao\CoreBundle\DependencyInjection\Attribute\AsHook;#[AsHook('sqlGetFromDB')]
classSqlGetFromDBListener{publicfunction__invoke(array$sql):array{// Modify the array of SQL statements
return$sql;}}