sqlGetFromFile

The sqlGetFromFile hook is triggered when parsing database.sql files. It passes the generated SQL definition and expects the same as return value.

Available

from Contao 2.11.0-rc2.

Parameters

  1. array $arrSql

    The parsed SQL definition.

Return Values

Return $arrSql after adding your custom definitions.

Example

<?php

// config.php
$GLOBALS['TL_HOOKS']['sqlGetFromFile'][] = array('MyClass', 'mySqlGetFromFile');

// MyClass.php
public function mySqlGetFromFile($arrSql)
{
    // Modify the array of SQL statements

    return $arrSql;
}

More information

References

See also

  • sqlCompileCommands – triggered when compiling the database update commands.
  • sqlGetFromDB – triggered when parsing the current database definition.
  • sqlGetFromDca – triggered when database definitions in DCA files are evaluated.

results matching ""

    No results matching ""