05-06-2020, 10:38 AM
In CI3, I created a custom view method (cView) by extending CI_Loader :
Since CI_Loader and the core folder no longer exist, I can't figure out where I should create my custom cView function in CI4? The main constrain is that cView() calls the native view() method.
Quote:// My controller, log user data and search queries
class MY_Loader extends CI_Loader
{
public function __construct()
{
parent::__construct();
}
// Custom view loader, load and return the view if display is true
public function cView($view, $vars = array(), $display = TRUE)
{
if (!$display) return '';
return $this->view($view, $vars, TRUE);
}
}
Since CI_Loader and the core folder no longer exist, I can't figure out where I should create my custom cView function in CI4? The main constrain is that cView() calls the native view() method.