Hello, here is the question of interest. The site has a registration from yii2-users. How to work with this class, if it is in the vendor folder. As you know, you can not touch it. Suppose I want to finish uploading a profile image - there is no standard yii2-users. How do I organize the work? Create a controller that inherits from the desired control in the vendor folder, and add the image loading code? Then the model and the presentation also need to be corrected. What do they do in such situations?
- In principle, in many frameworks you have to redefine the representation in your local area, the controller is sometimes a model, you can also use observers, then you only have to redefine the weaver and add a field to the model. Actually, what happens, let's say there is some kind of action to save the user, you can hang a listener on it and take the data you need and write it to the model. Again, if the observer is well developed, it is possible to catch the render of the factory that forms and add a photo load straight from it. - Naumov
|