/** * Initialize field settings */ protected function init() { parent::init(); $this->text = 'Submit'; $this->attributes['type'] = 'submit'; $this->attributes['id'] = !$this->name ? $this->attributes['id'] . 'submit' : $this->attributes['id']; }
/** * @param Button $button * @return string */ public function renderButton(Button $button) { $button->addClass('btn'); return '<button' . $this->renderAttributes($button->attributes) . '>' . $button->text . '</button>'; }