protected function getInlineJavaScript()
    {
        $quoted_string = SwatString::quoteJavaScriptString($this->id);
        return sprintf(
            'var %s_obj = new SwatRating(%s, %s);',
            $this->id,
            $quoted_string,
            intval($this->maximum_value)
        );
    }