dolibarr
x.y.z
|
Class DolibarrModules. More...
Public Member Functions | |
__construct ($db) | |
Constructor. More... | |
getName () | |
Gives the translated module name if translation exists in admin.lang or into language files of module. More... | |
getDesc () | |
Gives the translated module description if translation exists in admin.lang or the default module description. More... | |
getDescLong () | |
Gives the long description of a module. More... | |
getDescLongReadmeFound () | |
Return path of file if a README file was found. More... | |
getChangeLog () | |
Gives the changelog. More... | |
getPublisher () | |
Gives the publisher name. More... | |
getPublisherUrl () | |
Gives the publisher url. More... | |
getVersion ($translated=1) | |
Gives module version (translated if param $translated is on) For 'experimental' modules, gives 'experimental' translation For 'dolibarr' modules, gives Dolibarr version. More... | |
getModulePosition () | |
Gives the module position. More... | |
isCoreOrExternalModule () | |
Tells if module is core or external. More... | |
getLangFilesArray () | |
Gives module related language files list. More... | |
getExportDatasetLabel ($r) | |
Gives translated label of an export dataset. More... | |
getImportDatasetLabel ($r) | |
Gives translated label of an import dataset. More... | |
getLastActivationDate () | |
Gives the last date of activation. More... | |
getLastActivationInfo () | |
Gives the last author of activation. More... | |
insert_boxes ($option='') | |
Adds boxes. More... | |
delete_boxes () | |
Removes boxes. More... | |
insert_cronjobs () | |
Adds cronjobs. More... | |
delete_cronjobs () | |
Removes boxes. More... | |
delete_tabs () | |
Removes tabs. More... | |
insert_tabs () | |
Adds tabs. More... | |
insert_const () | |
Adds constants. More... | |
delete_const () | |
Removes constants tagged 'deleteonunactive'. More... | |
insert_permissions ($reinitadminperms=0, $force_entity=null, $notrigger=0) | |
Adds access rights. More... | |
delete_permissions () | |
Removes access rights. More... | |
insert_menus () | |
Adds menu entries. More... | |
delete_menus () | |
Removes menu entries. More... | |
create_dirs () | |
Creates directories. More... | |
insert_dirs ($name, $dir) | |
Adds directories definitions. More... | |
delete_dirs () | |
Removes directories. More... | |
insert_module_parts () | |
Adds generic parts. More... | |
delete_module_parts () | |
Removes generic parts. More... | |
init ($options='') | |
Function called when module is enabled. More... | |
remove ($options='') | |
Function called when module is disabled. More... | |
getKanbanView ($codeenabledisable='', $codetoconfig='') | |
Return Kanban view of a module. More... | |
checkForUpdate () | |
Check for module update TODO : store results for $this->url_last_version and $this->needUpdate Add a cron task to monitor for updates. More... | |
Public Attributes | |
$lastVersion = '' | |
Module last version. | |
$needUpdate = false | |
true indicate this module need update | |
Protected Member Functions | |
_init ($array_sql, $options='') | |
Enables a module. More... | |
_remove ($array_sql, $options='') | |
Disable function. More... | |
_active () | |
Insert constants for module activation. More... | |
_unactive () | |
Module deactivation. More... | |
_load_tables ($reldir, $onlywithsuffix='') | |
Create tables and keys required by module: More... | |
Class DolibarrModules.
Parent class for module descriptor class files
Definition at line 37 of file DolibarrModules.class.php.
DolibarrModules::__construct | ( | $db | ) |
Constructor.
Define names, constants, directories, boxes, permissions
Reimplemented in modMyModule, modZapier, modWorkstation, modWorkflow, modWebsite, modWebServicesClient, modWebServices, modWebhook, modVariants, modUser, modTicket, modTax, modTakePos, modSyslog, modSupplierProposal, modStripe, modStockTransfer, modStock, modSociete, modSocialNetworks, modService, modSalaries, modResource, modRecruitment, modReception, modReceiptPrinter, modPropale, modProjet, modProductBatch, modProduct, modPrinting, modPrelevement, modPaypal, modPaymentByBankTransfer, modPayBox, modPartnership, modOpenSurvey, modOauth, modNotification, modMultiCurrency, modMrp, modModuleBuilder, modMargin, modMailmanSpip, modMailing, modLoan, modLdap, modLabel, modKnowledgeManagement, modIntracommreport, modIncoterm, modImport, modHRM, modHoliday, modGravatar, modGeoIPMaxmind, modFTP, modFournisseur, modFicheinter, modFckeditor, modFacture, modExternalSite, modExternalRss, modExport, modExpenseReport, modExpedition, modEventOrganization, modEmailCollector, modECM, modDynamicPrices, modDon, modDocumentGeneration, modDeplacement, modDebugBar, modDav, modDataPolicy, modCron, modContrat, modComptabilite, modCommande, modCollab, modClickToDial, modCategorie, modBookmark, modBookCal, modBom, modBlockedLog, modBarcode, modBanque, modAsset, modApi, modAgenda, modAdherent, and modAccounting.
Definition at line 376 of file DolibarrModules.class.php.
References db.
|
protected |
Insert constants for module activation.
Definition at line 997 of file DolibarrModules.class.php.
|
protected |
Enables a module.
Inserts all informations into database.
array | $array_sql | SQL requests to be executed when enabling module |
string | $options | String with options when disabling module:
|
Definition at line 397 of file DolibarrModules.class.php.
|
protected |
Create tables and keys required by module:
string | $reldir | Relative directory where to scan files. Example: '/install/mysql/' or '/module/sql/' |
string | $onlywithsuffix | Only with the defined suffix |
Definition at line 1084 of file DolibarrModules.class.php.
|
protected |
Disable function.
Deletes the module constants and boxes from the database.
string[] | $array_sql | SQL requests to be executed when module is disabled |
string | $options | Options when disabling module: |
Definition at line 496 of file DolibarrModules.class.php.
|
protected |
Module deactivation.
Definition at line 1047 of file DolibarrModules.class.php.
DolibarrModules::checkForUpdate | ( | ) |
Check for module update TODO : store results for $this->url_last_version and $this->needUpdate Add a cron task to monitor for updates.
Definition at line 2451 of file DolibarrModules.class.php.
DolibarrModules::create_dirs | ( | ) |
Creates directories.
Definition at line 2090 of file DolibarrModules.class.php.
DolibarrModules::delete_boxes | ( | ) |
Removes boxes.
Definition at line 1363 of file DolibarrModules.class.php.
DolibarrModules::delete_const | ( | ) |
Removes constants tagged 'deleteonunactive'.
Definition at line 1764 of file DolibarrModules.class.php.
DolibarrModules::delete_cronjobs | ( | ) |
Removes boxes.
Definition at line 1571 of file DolibarrModules.class.php.
DolibarrModules::delete_dirs | ( | ) |
Removes directories.
Definition at line 2197 of file DolibarrModules.class.php.
DolibarrModules::delete_menus | ( | ) |
Removes menu entries.
Definition at line 2060 of file DolibarrModules.class.php.
DolibarrModules::delete_module_parts | ( | ) |
Removes generic parts.
Definition at line 2297 of file DolibarrModules.class.php.
DolibarrModules::delete_permissions | ( | ) |
Removes access rights.
Definition at line 1937 of file DolibarrModules.class.php.
DolibarrModules::delete_tabs | ( | ) |
Removes tabs.
Definition at line 1602 of file DolibarrModules.class.php.
DolibarrModules::getChangeLog | ( | ) |
Gives the changelog.
First check ChangeLog-la_LA.md then ChangeLog.md
Definition at line 733 of file DolibarrModules.class.php.
DolibarrModules::getDesc | ( | ) |
Gives the translated module description if translation exists in admin.lang or the default module description.
Definition at line 612 of file DolibarrModules.class.php.
DolibarrModules::getDescLong | ( | ) |
Gives the long description of a module.
First check README-la_LA.md then README.md If no markdown files found, it returns translated value of the key ->descriptionlong.
Definition at line 646 of file DolibarrModules.class.php.
DolibarrModules::getDescLongReadmeFound | ( | ) |
Return path of file if a README file was found.
Definition at line 698 of file DolibarrModules.class.php.
DolibarrModules::getExportDatasetLabel | ( | $r | ) |
Gives translated label of an export dataset.
int | $r | Dataset index |
Definition at line 884 of file DolibarrModules.class.php.
DolibarrModules::getImportDatasetLabel | ( | $r | ) |
Gives translated label of an import dataset.
int | $r | Dataset index |
Definition at line 906 of file DolibarrModules.class.php.
DolibarrModules::getKanbanView | ( | $codeenabledisable = '' , |
|
$codetoconfig = '' |
|||
) |
Return Kanban view of a module.
string | $codeenabledisable | HTML code for button to enable/disable module |
string | $codetoconfig | HTML code to go to config page |
Definition at line 2362 of file DolibarrModules.class.php.
DolibarrModules::getLangFilesArray | ( | ) |
Gives module related language files list.
Definition at line 872 of file DolibarrModules.class.php.
DolibarrModules::getLastActivationDate | ( | ) |
Gives the last date of activation.
Definition at line 927 of file DolibarrModules.class.php.
DolibarrModules::getLastActivationInfo | ( | ) |
Gives the last author of activation.
Definition at line 957 of file DolibarrModules.class.php.
DolibarrModules::getModulePosition | ( | ) |
Gives the module position.
Definition at line 829 of file DolibarrModules.class.php.
DolibarrModules::getName | ( | ) |
Gives the translated module name if translation exists in admin.lang or into language files of module.
Otherwise return the module key name.
Definition at line 578 of file DolibarrModules.class.php.
DolibarrModules::getPublisher | ( | ) |
Gives the publisher name.
Definition at line 775 of file DolibarrModules.class.php.
DolibarrModules::getPublisherUrl | ( | ) |
Gives the publisher url.
Definition at line 785 of file DolibarrModules.class.php.
DolibarrModules::getVersion | ( | $translated = 1 | ) |
Gives module version (translated if param $translated is on) For 'experimental' modules, gives 'experimental' translation For 'dolibarr' modules, gives Dolibarr version.
int | $translated | 1=Special version keys are translated, 0=Special version keys are not translated |
Definition at line 798 of file DolibarrModules.class.php.
DolibarrModules::init | ( | $options = '' | ) |
Function called when module is enabled.
The init function adds tabs, constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. It also creates data directories
string | $options | Options when enabling module ('', 'newboxdefonly', 'noboxes', 'menuonly') 'noboxes' = Do not insert boxes 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation |
Reimplemented in modMyModule, modZapier, modWorkstation, modWorkflow, modWebsite, modWebhook, modUser, modTicket, modTax, modTakePos, modSupplierProposal, modStockTransfer, modStock, modSociete, modService, modSalaries, modResource, modRecruitment, modReception, modReceiptPrinter, modPropale, modProjet, modProductBatch, modProduct, modPrelevement, modPaymentByBankTransfer, modPartnership, modOpenSurvey, modOauth, modNotification, modMultiCurrency, modMrp, modMailing, modLoan, modLabel, modKnowledgeManagement, modIntracommreport, modHRM, modHoliday, modFournisseur, modFicheinter, modFacture, modExternalRss, modExpenseReport, modExpedition, modEventOrganization, modEmailCollector, modDon, modDocumentGeneration, modDeplacement, modDebugBar, modDav, modDataPolicy, modContrat, modComptabilite, modCommande, modCategorie, modBookCal, modBom, modBlockedLog, modBarcode, modBanque, modAsset, modApi, and modAdherent.
Definition at line 2336 of file DolibarrModules.class.php.
DolibarrModules::insert_boxes | ( | $option = '' | ) |
Adds boxes.
string | $option | Options when disabling module ('newboxdefonly'=insert only boxes definition) |
Definition at line 1265 of file DolibarrModules.class.php.
DolibarrModules::insert_const | ( | ) |
Adds constants.
Definition at line 1695 of file DolibarrModules.class.php.
DolibarrModules::insert_cronjobs | ( | ) |
Adds cronjobs.
Definition at line 1437 of file DolibarrModules.class.php.
DolibarrModules::insert_dirs | ( | $name, | |
$dir | |||
) |
Adds directories definitions.
string | $name | Name |
string | $dir | Directory |
Definition at line 2158 of file DolibarrModules.class.php.
DolibarrModules::insert_menus | ( | ) |
Adds menu entries.
Definition at line 1963 of file DolibarrModules.class.php.
DolibarrModules::insert_module_parts | ( | ) |
Adds generic parts.
Definition at line 2223 of file DolibarrModules.class.php.
DolibarrModules::insert_permissions | ( | $reinitadminperms = 0 , |
|
$force_entity = null , |
|||
$notrigger = 0 |
|||
) |
Adds access rights.
int | $reinitadminperms | If 1, we also grant them to all admin users |
int | $force_entity | Force current entity |
int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
Definition at line 1803 of file DolibarrModules.class.php.
DolibarrModules::insert_tabs | ( | ) |
Adds tabs.
Definition at line 1628 of file DolibarrModules.class.php.
DolibarrModules::isCoreOrExternalModule | ( | ) |
Tells if module is core or external.
'dolibarr' and 'dolibarr_deprecated' is core 'experimental' and 'development' is core
Definition at line 849 of file DolibarrModules.class.php.
DolibarrModules::remove | ( | $options = '' | ) |
Function called when module is disabled.
The remove function removes tabs, constants, boxes, permissions and menus from Dolibarr database. Data directories are not deleted
string | $options | Options when enabling module ('', 'noboxes') |
Reimplemented in modMyModule, modZapier, modWorkstation, modWebhook, modTakePos, modSupplierProposal, modStockTransfer, modRecruitment, modPartnership, modMultiCurrency, modMrp, modKnowledgeManagement, modExternalRss, modEventOrganization, modEmailCollector, modDav, modDataPolicy, modBookCal, modBom, modBlockedLog, and modApi.
Definition at line 2349 of file DolibarrModules.class.php.