Prado\Web\UI\TClientSideOptions::setFunction PHP Метод

setFunction() защищенный Метод

Adds on client-side event handler by wrapping the code within a javascript function block. If the code begins with "javascript:", the code is assumed to be a javascript function block rather than arbiturary javascript statements.
protected setFunction ( $name, $code )
    protected function setFunction($name, $code)
    {
        if (!TJavaScript::isJsLiteral($code)) {
            $code = TJavaScript::quoteJsLiteral($this->ensureFunction($code));
        }
        $this->setOption($name, $code);
    }