lithium\template\View::_convertSteps PHP Method

_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.
protected _convertSteps ( array $command, array &$params, array $defaults ) : array
$command array A deprecated rendering instruction, i.e. `array('template' => '/path/to/template')`.
$params array The array of associated rendering parameters, passed by reference.
$defaults array Default step rendering options to be merged with the passed rendering instruction information.
return array Returns a converted set of rendering steps, to be executed in `render()`.
    protected function _convertSteps(array $command, array &$params, $defaults)
    {
        if (count($command) === 1) {
            $params['template'] = current($command);
            return array(array('path' => key($command)) + $defaults);
        }
        return $command;
    }