Update HtmlBuilder.php
Add support for Favicon files.
This commit is contained in:
1 parent
9af2030538
commit
19860865d1
1 file changed
+19
@@ -96,6 +96,25 @@ class HtmlBuilder {
|
||||
|
||||
return '<img src="'.$this->url->asset($url, $secure).'"'.$this->attributes($attributes).'>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a link to a Favicon file.
|
||||
*
|
||||
* @param string $url
|
||||
* @param array $attributes
|
||||
* @param bool $secure
|
||||
* @return string
|
||||
*/
|
||||
public function favicon($url, $attributes = array(), $secure = null)
|
||||
{
|
||||
$defaults = array('rel' => 'shortcut icon', 'type' => 'image/x-icon');
|
||||
|
||||
$attributes = $attributes + $defaults;
|
||||
|
||||
$attributes['href'] = $this->url->asset($url, $secure);
|
||||
|
||||
return '<link'.$this->attributes($attributes).'>'.PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a HTML link.
|
||||
|
||||
Reference in new issue
Block a user