Module ModuleBuilder: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 36: Line 36:
== Work on your new module ==
== Work on your new module ==


==='''Language Support''':===
===Language Support===


*This function allows developers to introduce additional languages into a module, enhancing its accessibility and usability across different linguistic demographics.
*This function allows developers to introduce additional languages into a module, enhancing its accessibility and usability across different linguistic demographics.
Line 45: Line 45:
<br />
<br />


==='''Menus''':===
===Menus===
Enables the crafting of custom menus within the module's UI, allowing users to navigate through the module's features more efficiently. This might include adding new menu items linked to specific functionalities or adjusting the module's navigation structure.
Enables the crafting of custom menus within the module's UI, allowing users to navigate through the module's features more efficiently. This might include adding new menu items linked to specific functionalities or adjusting the module's navigation structure.


Line 55: Line 55:
[[File:Menus.png|center|frameless|1482x1482px]]
[[File:Menus.png|center|frameless|1482x1482px]]


===Object:===
===Object===


*To add an object, simply enter the name, choose an icon, and specify the name of an existing table, if nothing is specified, it creates a new table
*To add an object, simply enter the name, choose an icon, and specify the name of an existing table, if nothing is specified, it creates a new table
Line 95: Line 95:
<br />
<br />


===Permissions:===
===Permissions===
For permissions, there are two ways to create them:  
For permissions, there are two ways to create them:  


Line 104: Line 104:
<br />
<br />


===Dictionaries :===
===Dictionaries===


*To create a dictionary, there is a dedicated section for this purpose. A create button (+) on the right displays a form to enter the name of the dictionary, which will become the name of the table in the database, preceded by "c_".
*To create a dictionary, there is a dedicated section for this purpose. A create button (+) on the right displays a form to enter the name of the dictionary, which will become the name of the table in the database, preceded by "c_".
Line 116: Line 116:
[[File:AddDictionnaire.png|center|thumb|1485x1485px|Add dictionary ]]
[[File:AddDictionnaire.png|center|thumb|1485x1485px|Add dictionary ]]


=== Hooks : ===
=== Hooks===


* Define in the <code>module_parts['hooks']</code> property within the module descriptor the contexts in which the hooks should be executed (the list of contexts can be found by searching for 'initHooks(' in the core code). Then, edit the hook file to add the code for your hooked functions (hookable functions can be found by searching for 'executeHooks' in the core code).  
* Define in the <code>module_parts['hooks']</code> property within the module descriptor the contexts in which the hooks should be executed (the list of contexts can be found by searching for 'initHooks(' in the core code). Then, edit the hook file to add the code for your hooked functions (hookable functions can be found by searching for 'executeHooks' in the core code).  
* Click the "+" button to generate the hooks code.
* Click the "+" button to generate the hooks code.


=== Triggers : ===
=== Triggers===


* In a module, the <code>triggers</code> part of the <code>module_parts</code> array indicates whether the module includes its own directory for triggers within Dolibarr's core triggers system, To generate the trigger file, simply use the "+" button provided by the ModuleBuilder interface in triggers section .
* In a module, the <code>triggers</code> part of the <code>module_parts</code> array indicates whether the module includes its own directory for triggers within Dolibarr's core triggers system, To generate the trigger file, simply use the "+" button provided by the ModuleBuilder interface in triggers section .


=== CSS / JS / CLI : ===
=== CSS / JS / CLI===


* '''CSS''' :  Once generated, you can use the file to define custom styles that will be applied to the module's frontend, improving its appearance and user experience. You can specify styles for layout, colors, fonts, and more, ensuring your module aligns with the desired aesthetic and usability standards.
* '''CSS''' :  Once generated, you can use the file to define custom styles that will be applied to the module's frontend, improving its appearance and user experience. You can specify styles for layout, colors, fonts, and more, ensuring your module aligns with the desired aesthetic and usability standards.
Line 134: Line 134:


By utilizing the ModuleBuilder to generate these files, you simplify the initial setup process for incorporating CSS, JS, and CLI functionalities into your module. Each file serves a distinct purpose, contributing to the module's visual design, interactivity, and operational flexibility, ultimately enhancing its overall utility and integration within the Dolibarr ecosystem.
By utilizing the ModuleBuilder to generate these files, you simplify the initial setup process for incorporating CSS, JS, and CLI functionalities into your module. Each file serves a distinct purpose, contributing to the module's visual design, interactivity, and operational flexibility, ultimately enhancing its overall utility and integration within the Dolibarr ecosystem.
<br />

Navigation menu