Example #1
0
 /**
  * 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'];
 }
Example #2
0
 /**
  * @param Button $button
  * @return string
  */
 public function renderButton(Button $button)
 {
     $button->addClass('btn');
     return '<button' . $this->renderAttributes($button->attributes) . '>' . $button->text . '</button>';
 }