Prado\Web\Javascripts\TJavaScript::isJsLiteral PHP Метод

isJsLiteral() публичный статический Метод

public static isJsLiteral ( $js ) : boolean
Результат boolean true if the parameter is marked as a javascript function, i.e. if it's considered as a raw javascript function that is not supposed to be encoded by {@link encode}
    public static function isJsLiteral($js)
    {
        return $js instanceof TJavaScriptLiteral;
    }

Usage Example

Пример #1
0
 /**
  * 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.
  * @param string option name
  * @param string javascript statements.
  */
 protected function setFunction($name, $code)
 {
     if (!TJavaScript::isJsLiteral($code)) {
         $code = TJavaScript::quoteJsLiteral($this->ensureFunction($code));
     }
     $this->setOption($name, $code);
 }
All Usage Examples Of Prado\Web\Javascripts\TJavaScript::isJsLiteral