src/View/Helper/JsHelper.php
public function getBuffer(array $options = [])
    {
        $docEol  = $this->Document->eol;
        $options = Hash::merge(['safe' => true], $options);

        if (Arr::key('block', $options)) {
            unset($options['block']);
        }

        if (count($this->_buffers)) {
            $scripts = $docEol .
                'jQuery (function($) {'  . $docEol .
                implode($docEol, $this->_buffers) . $docEol .
                '});' . $docEol;

            return $this->Html->scriptBlock($scripts, $options) . $docEol;
        }

        return null;
    }
public function getBuffer(array $options = [])
    {
        $docEol  = $this->Document->eol;
        $options = Hash::merge(['safe' => true], $options);

        if (Arr::key('block', $options)) {
            unset($options['block']);
        }

        if (count($this->_buffers)) {
            $scripts = $docEol .
                'jQuery (function($) {'  . $docEol .
                implode($docEol, $this->_buffers) . $docEol .
                '});' . $docEol;

            return $this->Html->scriptBlock($scripts, $options) . $docEol;
        }

        return null;
    }
public function getBuffer ( array $ options = [ ] ) { $ docEol = $ this -> Document -> eol ; $ options = Hash :: merge ( [ 'safe' => true ] , $ options ) ; if ( Arr :: key ( 'block' , $ options ) ) { unset ( $ options [ 'block' ] ) ; } if ( count ( $ this -> _buffers ) ) { $ scripts = $ docEol . 'jQuery (function($) {' . $ docEol . implode ( $ docEol , $ this -> _buffers ) . $ docEol . '});' . $ docEol ; return $ this -> Html -> scriptBlock ( $ scripts , $ options ) . $ docEol ; } return null ; }
Get all holds in buffer scripts.

@param array $options
@return null|string
Get all holds in buffer scripts .