Creating more advanced admin modules
In this section, we will add another admin module that will allow us to add new milkshakes. This module is more advanced than the modules we have used so far. To make this admin module more user-friendly, we should consider:
Allowing image files to be uploaded and thumbnails to be automatically generated
Hiding the
thumbnail_urlfield, as we don't need to display thisAdding a preview of the uploaded image file
Making a milkshake flavor list easier to use
Installing the required plugins and libraries
In most cases when we are dealing with forms, we use dedicated Symfony form objects and their widgets to do the job. In such situations, using helpers as previously described may be very difficult as we would have to render each and every field ourselves.
Symfony, by default, comes without any widget that requires an external library or framework. However, some of the most popular widgets (that were bundled as normal helpers in Symfony 1.0) are now packed into...