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

public method

Creates a tag for the <head> section of your document.

If there is a rendering context, then it also pushes the resulting tag to it.

The $options must match the named parameters from $_strings for the given $tag.

Parameters

  • string $tag

    the name of a key in $_strings

  • array $options

    the options required by $_strings[$tag]

Returns

mixed

a string if successful, otherwise null

Filter

This method can be filtered.

Source

	public function head($tag, array $options) {
		if (!isset($this->_strings[$tag])) {
			return null;
		}
		$method = __METHOD__;
		$filter = function($self, $options, $chain) use ($method, $tag) {
			return $self->invokeMethod('_render', array($method, $tag, $options));
		};
		$head = $this->_filter($method, $options, $filter);
		if ($this->_context) {
			$this->_context->head($head);
		}
		return $head;
	}