User tests: Successful: Unsuccessful:
This PR fixes the tracker item 32258 "FOFModel::getTmpInstance() clears input before getItemList() is run".
The problem was in the PostinstallModelMessages. It should use getState to read the eid and published state variables, not try to read them directly from the input object. Reading directly from the input is discouraged. The models act on their state, not the global application input. This is a fundamental tenant of the MVC architecture. My bad! I wrote some very bad code in that model.
This PR fixes the PostinstallModelMessages model and also modifies the call to it from CpanelViewCpanel to correctly set the state variable, exactly as proper MVC prescribes.
Not really. I just used the fluid syntax which makes use of the magic __set method to run setState and return $this. It's convenient when setting multiple state variables, I find it easier to read and I am used to using it. Both methods are valid and equivalent.
It's indeed nice as long as you know what the magic method does :)
Tested and works fine, thanks.
A question about the code mainly out of curiosity. I would have used
instead of
Is there a difference to it?