Add back HTML::image method

This commit is contained in:
Maxime Fabre committed 2013-03-27 11:29:08 +01:00
1 parent 2a3bd6ffa8
commit 525e94bfd8
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.
*