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);
    }
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);
    }
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 ) ; }
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
Returns a form with a single button .