Designing the general architecture of this module
This module will be bigger than the previous ones, which is why it is better to think about the technical design before getting deep into the code. First, let’s define the data structure.
Defining the data structure
As a blog category is defined by a localized title, we will use a Doctrine Entity for the blog category containing a date add field and a date update field. We will also have to create another Doctrine lang category entity containing the title localized field as a string, linked to the Lang
entity with a many-to-one relationship, and linked to the previous blog category with a many-to-one relationship too.
We will have to create a table named prefix_whblog_category
in the database with the following structure:
Column name |
Column type |
|
int (primary autoincrement) |
...