public function buildJsParams($parameters)
    {
        if (! $parameters) {
            return '';
        }

        $extractedParams = $this->extractJsFunctions($parameters);

        $json_parameters = json_encode($extractedParams['parameters'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);

        $json_parameters = str_replace($extractedParams['replacements'], $extractedParams['values'], $json_parameters);

        return trim($json_parameters, '{}');
    }
public function buildJsParams($parameters)
    {
        if (! $parameters) {
            return '';
        }

        $extractedParams = $this->extractJsFunctions($parameters);

        $json_parameters = json_encode($extractedParams['parameters'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);

        $json_parameters = str_replace($extractedParams['replacements'], $extractedParams['values'], $json_parameters);

        return trim($json_parameters, '{}');
    }
public function buildJsParams ( $ parameters ) { if ( ! $ parameters ) { return '' ; } $ extractedParams = $ this -> extractJsFunctions ( $ parameters ) ; $ json_parameters = json_encode ( $ extractedParams [ 'parameters' ] , JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) ; $ json_parameters = str_replace ( $ extractedParams [ 'replacements' ] , $ extractedParams [ 'values' ] , $ json_parameters ) ; return trim ( $ json_parameters , '{}' ) ; }
Formats a JSON string to be pasted into our Javascript.

@param $parameters

@return string
Formats a JSON string to be pasted into our Javascript .