本文整理匯總了PHP中Illuminate\Html\FormBuilder::button方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormBuilder::button方法的具體用法?PHP FormBuilder::button怎麽用?PHP FormBuilder::button使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Html\FormBuilder
的用法示例。
在下文中一共展示了FormBuilder::button方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: button
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);
}
示例2: buttonField
/**
* @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);
}
示例3: button
/**
* 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);
}
示例4: button
/**
* 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);
}
示例5: button
/**
* 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);
}
示例6: button
/**
* 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));
}