-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use View::$entity property for entity access #2192
Conversation
dfab4e3
to
7f9be35
Compare
aa80922
to
41d5803
Compare
6027f62
to
1a6f47f
Compare
b8b507f
to
701161b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, but didn't review all toughly.
I guess i understand the purpose, but it will make life a bit more complicated for programmer to remember that form views have entity, but grid views have model.
I do not have a lot of up to date code, but time ago using $form->model was quite a common case. Especially in form submit callback.
In 99% cases the impact is on
Form::$model
property usage. Seachform->model
in your codebase and replace it withform->entity
.The motivation is to simplify model/entity orientation for the developer. When Model is guaranteed to be entity only, is should never be named model.