-
Book Overview & Buying
-
Table Of Contents
Practical Module development for Prestashop 8
By :
As we want to store localized and non-localized fields in the database, we need to create two Doctrine entities. Before we get into the code, we need to create the /modules/whcategoryfields/composer.json file to manage how these classes are autoloaded from the module src/ folder that we will create.
Please have a look at the corresponding file provided in this book’s GitHub repository. You will notice that we just mapped the WebHelpers\WHCategoryFields namespace to the src/ folder. Don’t forget to execute the composer dumpautoload command from the /modules/whcategoryfields/ folder.
Exercise
As you already know how to create a simple non-localized entity from the previous chapter, you can try and create a WHCategoryFieldsExtension class by defining the first entity representing prefix_whcategoryfields_extension, which contains the id integer primary key field, the filename string field, and the extension_date_add and extension_date_update...