lithium\template\helper\Html::_metaLink()
Creates a link to an external resource.
Parameters
-
string
$type
The title of the external resource
-
mixed
$url
The address of the external resource or string for content attribute
-
array
$options
Other attributes for the generated tag. If the type attribute is 'html', 'rss', 'atom', or 'icon', the mime-type is returned.
Returns
stringSource
protected function _metaLink($type, $url = null, array $options = []) {
$options += isset($this->_metaLinks[$type]) ? $this->_metaLinks[$type] : [];
if ($type === 'icon') {
$url = $url ?: 'favicon.ico';
$standard = $this->_render(__METHOD__, 'meta-link', compact('url', 'options'), [
'handlers' => ['url' => 'path']
]);
$options['rel'] = 'shortcut icon';
$ieFix = $this->_render(__METHOD__, 'meta-link', compact('url', 'options'), [
'handlers' => ['url' => 'path']
]);
return "{$standard}\n\t{$ieFix}";
}
return $this->_render(__METHOD__, 'meta-link', compact('url', 'options'), [
'handlers' => []
]);
}