Render with the html_vars helper.

This commit is contained in:
Alex Tselegidis 2022-01-18 09:40:13 +01:00
parent cf1fe8d537
commit e23bdbb45f

View file

@ -26,10 +26,12 @@ function render_timezone_dropdown(string $attributes = ''): string
$timezones = $CI->timezones->to_grouped_array(); $timezones = $CI->timezones->to_grouped_array();
return $CI->load->view('components/timezone_dropdown', [ html_vars([
'timezones' => $timezones, 'attributes' => $attributes,
'attributes' => $attributes 'timezones' => $timezones
], TRUE); ]);
return $CI->load->view('components/timezone_dropdown', html_vars(), TRUE);
} }
/** /**
@ -43,9 +45,11 @@ function render_language_script(string $attributes = ''): string
{ {
$CI = get_instance(); $CI = get_instance();
return $CI->load->view('components/language_script', [ html_vars([
'attributes' => $attributes 'attributes' => $attributes,
], TRUE); ]);
return $CI->load->view('components/language_script', html_vars(), TRUE);
} }
/** /**
@ -59,7 +63,9 @@ function render_global_variables_script(string $attributes = ''): string
{ {
$CI = get_instance(); $CI = get_instance();
return $CI->load->view('components/global_variables_script', [ html_vars([
'attributes' => $attributes 'attributes' => $attributes,
], TRUE); ]);
return $CI->load->view('components/global_variables_script', html_vars(), TRUE);
} }