Welcome Guest, Not a member yet? Register   Sign In
CI4 lacks seems to lack a couple of super convenient CI3 features.
#10

(09-28-2018, 07:16 AM)daveĀ friend Wrote:
(09-27-2018, 10:58 PM)skunkbad Wrote: 2) Adding vars to views with $this->load->vars(). Similar to config->set_item(), being able to set vars that were available in any view was really handy in CI3.

The default "renderer" service is an instance of \CodeIgniter\View\View and that class has both setVar and setData methods. The part I haven't yet come to terms with yet is the default behavior of not maintaining the "view data" between calls to view(). Due to ingrained habits, I may opt for setting $saveData to true in application/Config/Views.php which is supposed to make view() behave in the traditional way. I've never understood the concern about data "bleeding" into other views.

I'm seeing saveData set to true by default. I'm glad you told me about that though, as that's how I expect it to behave.
Reply


Messages In This Thread
RE: CI4 lacks seems to lack a couple of super convenient CI3 features. - by skunkbad - 09-28-2018, 08:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB