Esempio n. 1
0
 public function button($value = null, $level = "default", $options = array())
 {
     if (array_key_exists('class', $options)) {
         $options['class'] = "btn btn-{$level} " . $options['class'];
     } else {
         $options['class'] = "btn btn-{$level}";
     }
     return parent::button($value, $options);
 }
 /**
  * @param Field $field
  * @param string $type
  * @return string
  */
 public function buttonField(Field $field, $type = 'button')
 {
     $attributes = $field->getAttributes();
     $attributes['type'] = $type;
     if ($field->label) {
         $value = $field->label;
         $attributes['value'] = $field->value;
     } else {
         $value = $field->value;
     }
     return $this->builder->button($value, $attributes);
 }
Esempio n. 3
0
 /**
  * Create a button element.
  *
  * @param string $value
  * @param array $options
  * @return string 
  * @static 
  */
 public static function button($value = null, $options = array())
 {
     return \Illuminate\Html\FormBuilder::button($value, $options);
 }
 /**
  * Create a button element.
  *
  * @param  string  $value
  * @param  array   $options
  * @return string
  */
 public function button($value = null, $options = array())
 {
     $options = $this->appendClassToOptions('btn', $options);
     return parent::button($value, $options);
 }
Esempio n. 5
0
 /**
  * Create a button element.
  *
  * @param  string  $value
  * @param  array   $options
  * @return string
  */
 public function button($value = null, $options = array())
 {
     if (!$this->access) {
         return;
     }
     return parent::button($value, $options);
 }
Esempio n. 6
0
 /**
  * Create a button element.
  *
  * @param  string  $value
  * @param  array   $options
  * @return \Illuminate\Support\HtmlString
  */
 public function button($value = null, $options = [])
 {
     return new HtmlString(parent::button($value, $options));
 }