sqlCompileCommands

The sqlCompileCommands hook is triggered when compiling the database update commands. It passes the array of changes and expects the same as return value.

Available

from Contao 2.11.0-rc2.

Parameters

  1. array $arrSql

    Array of changes that should be applied to the database.

Return Values

Return the array of changes that should be applied to the database.

Example

<?php

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

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

    return $arrSql;
}

More information

References

See also

  • sqlGetFromDB – triggered when parsing the current database definition.
  • sqlGetFromDca – triggered when database definitions in DCA files are evaluated.
  • sqlGetFromFile – triggered when parsing database.sql files.

results matching ""

    No results matching ""