mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +03:00
Added new layout method to the loader
This commit is contained in:
parent
cd9a92bed9
commit
6d567a74a4
1 changed files with 16 additions and 1 deletions
|
@ -40,5 +40,20 @@
|
||||||
* @property EA_URI $uri
|
* @property EA_URI $uri
|
||||||
*/
|
*/
|
||||||
class EA_Loader extends CI_Loader {
|
class EA_Loader extends CI_Loader {
|
||||||
//
|
/**
|
||||||
|
* Loads "layout" files.
|
||||||
|
*
|
||||||
|
* @param string $layout
|
||||||
|
* @param string $template
|
||||||
|
* @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)
|
||||||
|
{
|
||||||
|
$vars['template'] = APPPATH . 'views/' . $template . '.php';
|
||||||
|
|
||||||
|
return $this->view($layout, $vars, $return);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue