Adjusted the components html helper function
This commit is contained in:
parent
31b6c104c3
commit
ae408c4bfb
1 changed files with 2 additions and 4 deletions
|
@ -28,10 +28,8 @@ if ( ! function_exists('component'))
|
|||
* @param string $component Component template file name.
|
||||
* @param string $attributes HTML attributes for the parent component element.
|
||||
* @param array $params Additional parameters for the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function component(string $component, string $attributes = '', array $params = []): string
|
||||
function component(string $component, string $attributes = '', array $params = [])
|
||||
{
|
||||
/** @var EA_Controller $CI */
|
||||
$CI = &get_instance();
|
||||
|
@ -40,7 +38,7 @@ if ( ! function_exists('component'))
|
|||
'attributes' => $attributes
|
||||
]);
|
||||
|
||||
return $CI->load->view('components/' . $component, $vars, TRUE);
|
||||
echo $CI->load->view('components/' . $component, $vars, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue