Update FormBuilder.php
[ADD] Method reset() [ADD] Method image()
This commit is contained in:
1 parent
fa7d41c987
commit
48e7a49ea3
1 file changed
+32
@@ -538,6 +538,38 @@ class FormBuilder {
|
||||
return $this->getValueAttribute($name) == $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a HTML reset input element.
|
||||
*
|
||||
* @param string $value
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
public static function reset($value, $attributes = array())
|
||||
{
|
||||
return $this->input('reset', null, $value, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a HTML image input element.
|
||||
*
|
||||
* <code>
|
||||
* // Create an image input element
|
||||
* echo Form::image('img/submit.png');
|
||||
* </code>
|
||||
*
|
||||
* @param string $url
|
||||
* @param string $name
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
public static function image($url, $name = null, $attributes = array())
|
||||
{
|
||||
$attributes['src'] = URL::asset($url);
|
||||
|
||||
return $this->input('image', $name, null, $attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a submit button element.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user