compileDefinition

The compileDefinition hook is triggered when a format definition of a style sheet is written. It passes the configuration array as argument and expects a string as return value.

Available

from Contao 2.9.4.

Parameters

  1. array $arrRow

    The style definition database record.

Example

<?php

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

// MyClass.php
public function myCompileDefinition($arrRow)
{
    if (isset($arrRow['border-radius']))
    {
        return "\nborder-radius:" . $arrRow['border-radius'] . ";";
    }

    return '';
}

More information

References

See also

  • createDefinition - triggered when a format definition of a style sheet is imported.

results matching ""

    No results matching ""