48
edits
| Line 107: | Line 107: | ||
[[File:AddDictionnaire.png|center|thumb|1485x1485px|Add dictionary ]] | [[File:AddDictionnaire.png|center|thumb|1485x1485px|Add dictionary ]] | ||
=== 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). | |||
* Click the "+" button to generate the hooks code. | |||
=== 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 . | |||
=== 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. | |||
* '''JavaScript (JS)''' : After generating a JS file, you can write scripts to handle user interactions, perform validations, manipulate DOM elements. | |||
* The '''Command Line Interface (CLI)''' file plays a crucial role in facilitating module interaction via the command line, allowing for the execution of scripts, or functions without a graphical interface. This is particularly useful for automating processes. | |||
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 /> | <br /> | ||
edits