forked from mirrors/easyappointments
Added new layout loading method to the EA_Loader.php file.
This commit is contained in:
parent
2d681a774a
commit
ad3d726d1a
1 changed files with 4 additions and 4 deletions
|
@ -43,16 +43,16 @@ class EA_Loader extends CI_Loader {
|
|||
/**
|
||||
* Loads "layout" files.
|
||||
*
|
||||
* @param string $layout
|
||||
* @param string $template
|
||||
* @param string $layout Path to the layout view file.
|
||||
* @param string $page Path to the page view file.
|
||||
* @param array $vars An associative array of data to be extracted for use in the view
|
||||
* @param bool $return Whether to return the view output or leave it to the Output class
|
||||
*
|
||||
* @return object|string
|
||||
*/
|
||||
public function layout(string $layout, string $template, array $vars = [], bool $return = FALSE)
|
||||
public function layout(string $layout, string $page, array $vars = [], bool $return = FALSE)
|
||||
{
|
||||
$vars['template'] = APPPATH . 'views/' . $template . '.php';
|
||||
$vars['page_path'] = APPPATH . 'views/' . $page . '.php';
|
||||
|
||||
return $this->view($layout, $vars, $return);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue