source/Core/Smarty/Plugin/Emos.php
protected function _addJsFormat($sVarName, $mContents)
    {
        //get the first non array $mContents element
        $mVal = $mContents;
        while (is_array($mVal)) {
            $mVal = $mVal[0];
        }

        if (is_null($mVal)) {
            return;
        }

        $sEncoded = $this->_jsEncode(($mContents));

        return $this->_tab . 'emospro.' . $sVarName . ' = ' . $sEncoded . ';' . $this->_br;
    }
protected function _addJsFormat($sVarName, $mContents)
    {
        //get the first non array $mContents element
        $mVal = $mContents;
        while (is_array($mVal)) {
            $mVal = $mVal[0];
        }

        if (is_null($mVal)) {
            return;
        }

        $sEncoded = $this->_jsEncode(($mContents));

        return $this->_tab . 'emospro.' . $sVarName . ' = ' . $sEncoded . ';' . $this->_br;
    }
protected function _addJsFormat ( $ sVarName , $ mContents ) { //get the first non array $mContents element $ mVal = $ mContents ; while ( is_array ( $ mVal ) ) { $ mVal = $ mVal [ 0 ] ; } if ( is_null ( $ mVal ) ) { return ; } $ sEncoded = $ this -> _jsEncode ( ( $ mContents ) ) ; return $ this -> _tab . 'emospro.' . $ sVarName . ' = ' . $ sEncoded . ';' . $ this -> _br ; }
Formats a line in JS format

@param string $sVarName  Variable name
@param mixed  $mContents Variable value

@return string
Formats a line in JS format