public function close_window_button($text='') {
        if (empty($text)) {
            $text = get_string('closewindow');
        }
        $button = new single_button(new moodle_url('#'), $text, 'get');
        $button->add_action(new component_action('click', 'close_window'));

        return $this->container($this->render($button), 'closewindow');
    }
public function close_window_button($text='') {
        if (empty($text)) {
            $text = get_string('closewindow');
        }
        $button = new single_button(new moodle_url('#'), $text, 'get');
        $button->add_action(new component_action('click', 'close_window'));

        return $this->container($this->render($button), 'closewindow');
    }
public function close_window_button ( $ text = '' ) { if ( empty ( $ text ) ) { $ text = get_string ( 'closewindow' ) ; } $ button = new single_button ( new moodle_url ( '#' ) , $ text , 'get' ) ; $ button -> add_action ( new component_action ( 'click' , 'close_window' ) ) ; return $ this -> container ( $ this -> render ( $ button ) , 'closewindow' ) ; }
Returns HTML to display a simple button to close a window

@param string $text The lang string for the button's label (already output from get_string())
@return string html fragment
Returns HTML to display a simple button to close a window