Creating a new database model
Create SQL database schema
- Add
example-
extension/ ext_ tables. sql - Model the database scheme from the TCA or PHP model perspective, then check which fields still have to be added to the ext_tables regarding your TYPO3 version by comparing database model with configuration, read more here
-
Insert your SQL database schema definition into that file
-
Each entity is represented by one database table
- Table name has the following structure:
tx_
{extension key without underscores}_ domain_ model_ {entity name} - Each entity property is represented by one database column
- Table name has the following structure:
-
CREATE TABLE tx_exampleextension_domain_model_example (
title varchar(255) DEFAULT '' NOT NULL,
description text DEFAULT '',
foo_foo tinyint(1) DEFAULT '1'
);
Copied!
Create TCA configuration
- Add
example-
* In the example:extension/ Configuration/ TCA/ {table name}. php example-
extension/ Configuration/ TCA/ tx_ exampleextension_ domain_ model_ example. php - The TCA defines types, validation and backend-UI-related parameters for each entity property * See TCA Reference for further information
- Add localization files according to Language
-
example-
extension/ Resources/ Private/ Language/ locallang_ db. xlf example-
extension/ Resources/ Private/ Language/ de. locallang_ db. xlf
- Add table icon
-
example-
extension/ Resources/ Public/ Icons/ {entity name}. svg