Move Template::layout() to LayoutHelper
This commit is contained in:
@@ -69,23 +69,6 @@ class Template
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a page layout
|
||||
*
|
||||
* @access public
|
||||
* @param string $template_name Template name
|
||||
* @param array $template_args Key/value map
|
||||
* @param string $layout_name Layout name
|
||||
* @return string
|
||||
*/
|
||||
public function layout($template_name, array $template_args = array(), $layout_name = 'layout')
|
||||
{
|
||||
return $this->render(
|
||||
$layout_name,
|
||||
$template_args + array('content_for_layout' => $this->render($template_name, $template_args))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define a new template override
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user