Bootstrap\View\Helper\BootstrapFormHelper::button PHP Method

button() public method

### New options: - bootstrap-type: Twitter bootstrap button type (primary, danger, info, etc.) - bootstrap-size: Twitter bootstrap button size (mini, small, large)
public button ( $title, array $options = [] )
$options array
    public function button($title, array $options = [])
    {
        return $this->_easyIcon('parent::button', $title, $this->_createButtonOptions($options));
    }

Usage Example

Beispiel #1
0
 public function button($title, array $options = [])
 {
     if (!isset($options['icon'])) {
         $title = $this->Html->icon('save') . ' ' . $title;
     } else {
         if ($options['icon'] != '') {
             $title = $this->Html->icon($options['icon']) . ' ' . $title;
         }
     }
     return parent::button($title, $options);
 }