original_string: public function delete($form_params = [], $button_label = 'x', $button_options = [], $hiddenFields = [])
      {
          $form_params['method'] = 'delete';
          $form_params['class'] = isset($form_params['class']) ? $form_params['class'] : 'del-form pull-right float-right';
          if (isset($form_params['onsubmit'])) {
              if ($form_params['onsubmit'] != false) {
                  $form_params['onsubmit'] = $form_params['onsubmit'];
              }
          } else {
              $form_params['onsubmit'] = 'Are you sure to delete this?';
          }
  
          if (!isset($button_options['title'])) {
              $button_options['title'] = 'Delete this item';
          }
  
          return $this->formButton($form_params, $button_label, $button_options, $hiddenFields);
      }
code: public function delete($form_params = [], $button_label = 'x', $button_options = [], $hiddenFields = [])
      {
          $form_params['method'] = 'delete';
          $form_params['class'] = isset($form_params['class']) ? $form_params['class'] : 'del-form pull-right float-right';
          if (isset($form_params['onsubmit'])) {
              if ($form_params['onsubmit'] != false) {
                  $form_params['onsubmit'] = $form_params['onsubmit'];
              }
          } else {
              $form_params['onsubmit'] = 'Are you sure to delete this?';
          }
  
          if (!isset($button_options['title'])) {
              $button_options['title'] = 'Delete this item';
          }
  
          return $this->formButton($form_params, $button_label, $button_options, $hiddenFields);
      }
code_tokens: public function delete ( $ form_params = [ ] , $ button_label = 'x' , $ button_options = [ ] , $ hiddenFields = [ ] ) { $ form_params [ 'method' ] = 'delete' ; $ form_params [ 'class' ] = isset ( $ form_params [ 'class' ] ) ? $ form_params [ 'class' ] : 'del-form pull-right float-right' ; if ( isset ( $ form_params [ 'onsubmit' ] ) ) { if ( $ form_params [ 'onsubmit' ] != false ) { $ form_params [ 'onsubmit' ] = $ form_params [ 'onsubmit' ] ; } } else { $ form_params [ 'onsubmit' ] = 'Are you sure to delete this?' ; } if ( ! isset ( $ button_options [ 'title' ] ) ) { $ button_options [ 'title' ] = 'Delete this item' ; } return $ this -> formButton ( $ form_params , $ button_label , $ button_options , $ hiddenFields ) ; }
docstring: A form button that dedicated for submitting a delete request.
  
  @param  array  $form_params  The form attribtues.
  @param  string  $button_label  The delete button text or label.
  @param  array  $button_options  The button attributes.
  @param  array  $hiddenFields  Additional hidden fields.
  @return string  Generated delete form button.
docstring_tokens: A form button that dedicated for submitting a delete request .