original_string: public function limitControl(array $limits = [], $default = null, array $options = [])
      {
          $out = $this->Form->create(null, ['type' => 'get']);
  
          if (empty($default) || !is_numeric($default)) {
              $default = $this->param('perPage');
          }
  
          if (empty($limits)) {
              $limits = [
                  '20' => '20',
                  '50' => '50',
                  '100' => '100'
              ];
          }
  
          $out .= $this->Form->control('limit', $options + [
                  'type' => 'select',
                  'label' => __('View'),
                  'value' => $default,
                  'options' => $limits,
                  'onChange' => 'this.form.submit()'
              ]);
          $out .= $this->Form->end();
  
          return $out;
      }
code: public function limitControl(array $limits = [], $default = null, array $options = [])
      {
          $out = $this->Form->create(null, ['type' => 'get']);
  
          if (empty($default) || !is_numeric($default)) {
              $default = $this->param('perPage');
          }
  
          if (empty($limits)) {
              $limits = [
                  '20' => '20',
                  '50' => '50',
                  '100' => '100'
              ];
          }
  
          $out .= $this->Form->control('limit', $options + [
                  'type' => 'select',
                  'label' => __('View'),
                  'value' => $default,
                  'options' => $limits,
                  'onChange' => 'this.form.submit()'
              ]);
          $out .= $this->Form->end();
  
          return $out;
      }
code_tokens: public function limitControl ( array $ limits = [ ] , $ default = null , array $ options = [ ] ) { $ out = $ this -> Form -> create ( null , [ 'type' => 'get' ] ) ; if ( empty ( $ default ) || ! is_numeric ( $ default ) ) { $ default = $ this -> param ( 'perPage' ) ; } if ( empty ( $ limits ) ) { $ limits = [ '20' => '20' , '50' => '50' , '100' => '100' ] ; } $ out .= $ this -> Form -> control ( 'limit' , $ options + [ 'type' => 'select' , 'label' => __ ( 'View' ) , 'value' => $ default , 'options' => $ limits , 'onChange' => 'this.form.submit()' ] ) ; $ out .= $ this -> Form -> end ( ) ; return $ out ; }
docstring: Dropdown select for pagination limit.
  This will generate a wrapping form.
  
  @param array $limits The options array.
  @param int|null $default Default option for pagination limit. Defaults to `$this->param('perPage')`.
  @param array $options Options for Select tag attributes like class, id or event
  @return string html output.
docstring_tokens: Dropdown select for pagination limit . This will generate a wrapping form .