Your answer was helpful, however, it only explains how actionAdmin gets the scenario ‘search’. What about scenarios like ‘insert’, ‘update’, ‘login’, ‘register’, where are these defined? I understand I can manually set the scenario to some other values but what sets these ‘default’ scenarios in the first place, other than the ‘search’ from actionAdmin?
I was at a point thinking that the scenario in actionCreate was ‘create’, I then realized that the scenario is ‘insert’ instead.
Maybe I am missing something somewhere. Some explanation will be very much appreciated. Thanks!
As a quick reply, as far as I can remember the ‘insert’ and ‘update’ scenarios are default ones defined in the base model logic depending on whether the model is a new record or not.
‘search’ is not a default scenario but is user by Gii for defining search rules and then passed in the model construction in the admin view, in the same way that any other scenario that you might invent rules for should be.