Update FormBuilder.php

[ADD] Method reset()
[ADD] Method image()
This commit is contained in:
Jonathan Thuau committed 2013-05-07 16:32:15 +03:00
1 parent fa7d41c987
commit 48e7a49ea3
1 file changed
+32
+32
View File
@@ -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.
*