lithium\template\helper\Html::_metaLink()

protected method

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

string

Source

	protected function _metaLink($type, $url = null, array $options = array()) {
		$options += isset($this->_metaLinks[$type]) ? $this->_metaLinks[$type] : array();

		if ($type === 'icon') {
			$url = $url ?: 'favicon.ico';
			$standard = $this->_render(__METHOD__, 'meta-link', compact('url', 'options'), array(
				'handlers' => array('url' => 'path')
			));
			$options['rel'] = 'shortcut icon';
			$ieFix = $this->_render(__METHOD__, 'meta-link', compact('url', 'options'), array(
				'handlers' => array('url' => 'path')
			));
			return "{$standard}\n\t{$ieFix}";
		}
		return $this->_render(__METHOD__, 'meta-link', compact('url', 'options'), array(
			'handlers' => array()
		));
	}