Create module_name.install file in drupal 8 module directory and add related code into this file.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2740527-4.patch | 3.86 KB | sagar ramgade |
Create module_name.install file in drupal 8 module directory and add related code into this file.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2740527-4.patch | 3.86 KB | sagar ramgade |
Comments
Comment #2
nitin shirole commentedComment #3
nitin shirole commentedComment #4
sagar ramgade commentedNeeds work as t() was called in column descriptions and State APu was used which shouldn't be the case. The patch attached addresses these issues.
Comment #6
nitin shirole commentedComment #8
humayunrashidchattu commentedI wanted to create a table with some predefined data on installing a custom module. How to achieve this?
Comment #9
kunalkursija commentedHi @Sagar Ramgade,
I Was checking the patch's hook_uninstall() and I guess the code
is not required because Drupal core automatically deletes the configuration related to the module we uninstall.
Comment #10
sagar ramgade commentedIt does only when configurations has a dependency set, please see this https://drupal.stackexchange.com/questions/173684/how-to-remove-mymodule..., so we should set dependency in the configs.