PMA\libraries\Template::setHelper PHP Method

setHelper() public method

Adds a function for use by the template
public setHelper ( string $funcName, callable $funcDef )
$funcName string function name
$funcDef callable function definition
    public function setHelper($funcName, $funcDef)
    {
        if (!isset($this->helperFunctions[$funcName])) {
            $this->helperFunctions[$funcName] = $funcDef;
        } else {
            throw new \LogicException('The function "' . $funcName . '" is already associated with the template.');
        }
    }