Is it acceptable for widget to have its own AR models ?
Is it acceptable for widget to have its own AR models ?
Models don’t belong to any controller/widget, so you can use them everywhere.
No, I mean a AR model, that is used only in this widget. If so, maybe it is right to place it with the widget?
Though, now I think it will be better to create a small module with that widget and needed models.
I think that is normal.
Widgets like recoverPassword usually have a formModel that is used only in this widget.
In that case I prefer to leave the model with all the other models, but you can put the code of the model right after the widget, it changes nothing.