Merge pull request #719 from Anahkiasen/patch-1
[Proposal] Add back HTML::image method
This commit is contained in:
commit
8104c77512
1 file changed
+15
@@ -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.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user