original_string: public function single_button($url, $label, $method='post', array $options=null) {
          if (!($url instanceof moodle_url)) {
              $url = new moodle_url($url);
          }
          $button = new single_button($url, $label, $method);
  
          foreach ((array)$options as $key=>$value) {
              if (array_key_exists($key, $button)) {
                  $button->$key = $value;
              }
          }
  
          return $this->render($button);
      }
code: public function single_button($url, $label, $method='post', array $options=null) {
          if (!($url instanceof moodle_url)) {
              $url = new moodle_url($url);
          }
          $button = new single_button($url, $label, $method);
  
          foreach ((array)$options as $key=>$value) {
              if (array_key_exists($key, $button)) {
                  $button->$key = $value;
              }
          }
  
          return $this->render($button);
      }
code_tokens: public function single_button ( $ url , $ label , $ method = 'post' , array $ options = null ) { if ( ! ( $ url instanceof moodle_url ) ) { $ url = new moodle_url ( $ url ) ; } $ button = new single_button ( $ url , $ label , $ method ) ; foreach ( ( array ) $ options as $ key => $ value ) { if ( array_key_exists ( $ key , $ button ) ) { $ button -> $ key = $ value ; } } return $ this -> render ( $ button ) ; }
docstring: Returns a form with a single button.
  
  Theme developers: DO NOT OVERRIDE! Please override function
  {@link core_renderer::render_single_button()} instead.
  
  @param string|moodle_url $url
  @param string $label button text
  @param string $method get or post submit method
  @param array $options associative array {disabled, title, etc.}
  @return string HTML fragment
docstring_tokens: Returns a form with a single button .