Creating entities and relationships, repositories, and database tables
As you now know how to create the skeleton of a module, we will suppose for brevity that you know how to create the /modules/whblog/
folder and the main module class named WHBlog
. Please have a look at the GitHub repository if you need it.
Reminder
It would be too long to present all the code for the commands, queries, and data transfer objects (DTOs) in this book, which is why all the code for those classes is provided in the GitHub repository of this book and we recommend you have it open while reading this book.
As we can’t yet use the Symfony console command to automatically generate the migrations necessary to build our tables, let’s do it manually via the install()
function by following the data structure defined in the previous section.
As the table creation is a bit longer than before, we will divide it into two parts:
- The localized tables (suffixed by
_lang
) - The non...