function setJsCompressor($compressor)
    {
        if (!isset($this->compressors[$compressor])) {
            throw new \InvalidArgumentException(sprintf('Undefined compressor "%s"', $compressor));
        }

        $js = $this->contentType('.js');

        if ($this->jsCompressor !== null) {
            $this->bundleProcessors->unregister($js, $this->compressors[$this->jsCompressor]);
        }

        $this->jsCompressor = $compressor;
        $this->bundleProcessors->register($js, $this->compressors[$compressor]);
    }
function setJsCompressor($compressor)
    {
        if (!isset($this->compressors[$compressor])) {
            throw new \InvalidArgumentException(sprintf('Undefined compressor "%s"', $compressor));
        }

        $js = $this->contentType('.js');

        if ($this->jsCompressor !== null) {
            $this->bundleProcessors->unregister($js, $this->compressors[$this->jsCompressor]);
        }

        $this->jsCompressor = $compressor;
        $this->bundleProcessors->register($js, $this->compressors[$compressor]);
    }
function setJsCompressor ( $ compressor ) { if ( ! isset ( $ this -> compressors [ $ compressor ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Undefined compressor "%s"' , $ compressor ) ) ; } $ js = $ this -> contentType ( '.js' ) ; if ( $ this -> jsCompressor !== null ) { $ this -> bundleProcessors -> unregister ( $ js , $ this -> compressors [ $ this -> jsCompressor ] ) ; } $ this -> jsCompressor = $ compressor ; $ this -> bundleProcessors -> register ( $ js , $ this -> compressors [ $ compressor ] ) ; }
Set the JS compressor

Adds the compressor class as bundle processor for JavaScript files.
See $compressors for all available compressors.

@param string $compressor Identifier of the compressor
Set the JS compressor