bedezign\yii2\audit\Audit::registerFunction PHP Méthode

registerFunction() public méthode

Allows panels to register functions that can be called directly on the module
public registerFunction ( string $name, callable $callback )
$name string
$callback callable
    public function registerFunction($name, $callback)
    {
        if (isset($this->_panelFunctions[$name])) {
            throw new InvalidParamException("The '{$name}'-function has already been defined.");
        }
        $this->_panelFunctions[$name] = $callback;
    }