lithium\template\View::_convertSteps()

protected method

Handles API backward compatibility by converting an array-based rendering instruction passed to render() as a process, to a set of rendering steps, rewriting any associated rendering parameters as necessary.

Parameters

  • array $command

    A deprecated rendering instruction, i.e. array('template' => '/path/to/template').

  • array $params

    The array of associated rendering parameters, passed by reference.

  • array $defaults

    Default step rendering options to be merged with the passed rendering instruction information.

Returns

array

Returns a converted set of rendering steps, to be executed in render().

Source

	protected function _convertSteps(array $command, array &$params, $defaults) {
		if (count($command) === 1) {
			$params['template'] = current($command);
			return [['path' => key($command)] + $defaults];
		}
		return $command;
	}