mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 12:02:41 +00:00
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:
parent
9ca5e14891
commit
0419f05186
1 changed files with 10 additions and 3 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue