mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 01:52:22 +03:00
Default value for the styles, scripts and global variables entry
This commit is contained in:
parent
d96e65792b
commit
35393642fa
1 changed files with 6 additions and 0 deletions
|
@ -53,6 +53,12 @@ class EA_Loader extends CI_Loader {
|
|||
public function layout(string $layout, string $page, array $vars = [], bool $return = FALSE)
|
||||
{
|
||||
$vars['page_path'] = APPPATH . 'views/' . $page . '.php';
|
||||
|
||||
$vars['styles'] = $vars['styles'] ?? [];
|
||||
|
||||
$vars['scripts'] = $vars['scripts'] ?? [];
|
||||
|
||||
$vars['global_variables'] = $vars['global_variables'] ?? [];
|
||||
|
||||
return $this->view($layout, $vars, $return);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue