Adding fix for View::element().

params variable was reset to an array
Added the method to 1.2.x.x branch also

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4074 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-12-06 17:43:14 +00:00
parent 9ca5e14891
commit 0419f05186

View file

@ -369,10 +369,17 @@ class View extends Object {
return "(Error rendering Element: {$name})";
}
function element($name) {
return ELEMENTS . $name . $this->ext;
/**
* Wrapper for View::renderElement();
*
* @param string $name Name of template file in the/app/views/elements/ folder
* @param array $params Array of data to be made available to the for rendered view (i.e. the Element)
* @return string View::renderElement()
* @access public
*/
function element($name, $params = array()) {
return $this->renderElement($name, $params);
}
/**
* Renders a layout. Returns output from _render(). Returns false on error.
*