button() public method

Create a button element.
public button ( string $value = null, array $options = [] ) : Illuminate\Support\HtmlString
$value string
$options array
return Illuminate\Support\HtmlString
 /**
  * Create a Boostrap submit button.
  *
  * @param  string $value
  * @param  array  $options
  *
  * @return string
  */
 public function button($value = null, array $options = [])
 {
     $options = array_merge(['class' => 'btn btn-primary'], $options);
     $inputElement = $this->form->button($value, $options);
     $wrapperOptions = $this->isHorizontal() ? ['class' => implode(' ', [$this->getLeftColumnOffsetClass(), $this->getRightColumnClass()])] : [];
     $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . '</div>';
     return $this->getFormGroup(null, $wrapperElement);
 }
Exemplo n.º 2
0
 /**
  * Create a button element.
  *
  * @param string $value
  * @param array $options
  * @return string 
  * @static 
  */
 public static function button($value = null, $options = array())
 {
     return \Collective\Html\FormBuilder::button($value, $options);
 }
Exemplo n.º 3
0
 public function submitButtonIcon($value = null, $options = [])
 {
     $options['class'] = '' . (isset($options['class']) ? ' ' . $options['class'] : '');
     return parent::button($value, $options);
 }
Exemplo n.º 4
0
 /**
  * Create a button element.
  *
  * @param  string  $value
  * @param  array   $options
  * @return string
  */
 public function button($value = null, $options = array())
 {
     if (!array_key_exists('class', $options)) {
         $options['class'] = 'btn btn-default';
     }
     return parent::button($value, $options);
 }