public function toJsObject()
    {
        if ($this->params) {
            $strParams = [];
            foreach ($this->params as $param) {
                $strParams[] = Helper::toJsObject($param);
            }
            $strParams = implode(",", $strParams);
        } else {
            $strParams = '';
        }
        $strFuncName = $this->strFunctionName;
        if ($this->strContext) {
            $strFuncName = $this->strContext . '.' . $strFuncName;
        }
        return $strFuncName . '(' . $strParams . ')';
    }
public function toJsObject()
    {
        if ($this->params) {
            $strParams = [];
            foreach ($this->params as $param) {
                $strParams[] = Helper::toJsObject($param);
            }
            $strParams = implode(",", $strParams);
        } else {
            $strParams = '';
        }
        $strFuncName = $this->strFunctionName;
        if ($this->strContext) {
            $strFuncName = $this->strContext . '.' . $strFuncName;
        }
        return $strFuncName . '(' . $strParams . ')';
    }
public function toJsObject ( ) { if ( $ this -> params ) { $ strParams = [ ] ; foreach ( $ this -> params as $ param ) { $ strParams [ ] = Helper :: toJsObject ( $ param ) ; } $ strParams = implode ( "," , $ strParams ) ; } else { $ strParams = '' ; } $ strFuncName = $ this -> strFunctionName ; if ( $ this -> strContext ) { $ strFuncName = $ this -> strContext . '.' . $ strFuncName ; } return $ strFuncName . '(' . $ strParams . ')' ; }
Returns this as a javascript string to be included in the end script of the page.
@return string
Returns this as a javascript string to be included in the end script of the page .