lithium\template\view\Renderer::set()

public method

Allows variables to be set by one template and used in subsequent templates rendered using the same context. For example, a variable can be set in a template and used in an element rendered within a template, or an element or template could set a variable which would be made available in the layout.

Parameters

  • array $data

    An array of key/value pairs representing local variables that should be made available to all other templates rendered in this rendering context.

Returns

void

Source

	public function set(array $data = []) {
		$this->_data = $data + $this->_data;
		$this->_vars = $data + $this->_vars;
	}