I would like to create a new Entity called: EntityA
which is located in a custom module which is called: MyModule.
All MyModule code is located inside:
I have created the following files inside the Module folder specified above:
File: Resources/metadata/scopes/EntityA.json
Does it need anything else specified in scopes?
File: Resources/metadata/entityDefs/EntityA.json
Is anything else required here?
Does it need language definitions in Resources/i18n/<lang>/EntityA.json if no usage in Frontend (UI)?
Is it required to define any of the following class definition files which solely extend from Core Classes, if the only usage will be CRUD operations through the EntityManager Class?
which is located in a custom module which is called: MyModule.
All MyModule code is located inside:
Code:
<espo-root>/custom/Espo/Modules/MyModule
File: Resources/metadata/scopes/EntityA.json
PHP Code:
{
"entity": true,
"layouts": false,
"tab": false,
"module": "MyModule"
}
File: Resources/metadata/entityDefs/EntityA.json
PHP Code:
{
"fields": {
/** define all fields with types etc here **/
},
"indexes": {
/** define db indexes here **/
}
}
Does it need language definitions in Resources/i18n/<lang>/EntityA.json if no usage in Frontend (UI)?
Code:
Controllers/EntityA.php Entities/EntityA.php Repositories/EntityA.php
Comment