Module development: Difference between revisions

Jump to navigation Jump to search
Line 216: Line 216:
Then enter your code to display the page.
Then enter your code to display the page.


* To include a class dedicated to the module is done using a Dolibarr function (and not using directly include_once):
* To include a class or library dedicated to the module is done using a Dolibarr function (and not using directly include_once):
''Example :''
''Example :''
<source lang="php">
<source lang="php">
Line 222: Line 222:
</source>
</source>


* To include classes provied with Dolibarr, use the following syntax:
* To include classes provided with Dolibarr, use the following syntax:
''Example :''
''Example :''
<source lang="php">
<source lang="php">
if (! class_exists('DoliClass')) require DOL_DOCUMENT_ROOT.'/core/class/doli.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doli.class.php';
</source>
</source>


Navigation menu