/** * * @return $this * */ public function add_button($text, $onclick = '', array $attrs = array(), $class = '', $type = 'button') { $button = new HTMLLongTag('button', $text); $button->update_params($attrs); $button->set_param('type', $type); $button->add_class($class); $button->add_class(self::$_DEFAULT_BUTTON_CLASS); if ($onclick) { $button->set_attr('onclick', $onclick); } $this->_buttons[] = $button; return $this; }