Merge pull request #719 from Anahkiasen/patch-1

[Proposal] Add back HTML::image method
This commit is contained in:
Taylor Otwell committed 2013-03-27 05:54:18 -07:00
commit 8104c77512
1 file changed
+15
+15
View File
@@ -44,6 +44,21 @@ class HtmlBuilder {
return html_entity_decode($value, ENT_QUOTES, 'UTF-8');
}
/**
* Generate an HTML image element.
*
* @param string $url
* @param string $alt
* @param array $attributes
* @return string
*/
public function image($url, $alt = null, $attributes = array())
{
$attributes['alt'] = $alt;
return '<img src="'.$this->url->asset($url).'"'.$this->attributes($attributes).'>';
}
/**
* Generate a HTML link.
*