dolibarr 23.0.3
modCategorie Class Reference

Class to describe and enable module Categorie. More...

Inheritance diagram for modCategorie:
Collaboration diagram for modCategorie:

Public Member Functions

 __construct ($db)
 Constructor.
 
 init ($options='')
 Function called when module is enabled.
 
- Public Member Functions inherited from DolibarrModules
 getName ()
 Gives the translated module name if translation exists in admin.lang or into language files of module.
 
 getDesc ($foruseinpopupdesc=0)
 Gives the translated module description if translation exists in admin.lang or the default module description.
 
 getDescLong ()
 Gives the long description of a module.
 
 getDescLongReadmeFound ()
 Return path of file if a README file was found.
 
 getChangeLog ()
 Gives the changelog.
 
 getPublisher ()
 Gives the publisher name.
 
 getPublisherUrl ()
 Gives the publisher url.
 
 getVersion ($translated=1)
 Gives module version (translated if param $translated is on) For 'experimental' modules, gives 'experimental' translation For 'dolibarr' modules, gives Dolibarr version.
 
 getModulePosition ()
 Gives the module position.
 
 isCoreOrExternalModule ()
 Tells if module is core or external.
 
 getLangFilesArray ()
 Gives module related language files list.
 
 getExportDatasetLabel ($r)
 Gives translated label of an export dataset.
 
 getImportDatasetLabel ($r)
 Gives translated label of an import dataset.
 
 getLastActivationDate ()
 Gives the last date of activation.
 
 getLastActivationInfo ()
 Gives the last author of activation.
 
 insert_boxes ($option='')
 Adds boxes.
 
 delete_boxes ()
 Removes boxes.
 
 insert_cronjobs ()
 Adds cronjobs.
 
 delete_cronjobs ()
 Removes boxes.
 
 delete_tabs ()
 Removes tabs.
 
 insert_tabs ()
 Adds tabs.
 
 insert_const ()
 Adds constants.
 
 delete_const ()
 Removes constants tagged 'deleteonunactive'.
 
 insert_permissions ($reinitadminperms=0, $force_entity=null, $notrigger=0)
 Adds access rights.
 
 delete_permissions ()
 Removes access rights.
 
 insert_menus ()
 Adds menu entries.
 
 delete_menus ()
 Removes menu entries.
 
 create_dirs ()
 Creates directories.
 
 insert_dirs ($name, $dir)
 Adds directories definitions.
 
 delete_dirs ()
 Removes directories.
 
 insert_module_parts ()
 Save configuration for generic features.
 
 delete_module_parts ()
 Removes generic parts.
 
 remove ($options='')
 Function called when module is disabled.
 
 getKanbanView ($codeenabledisable='', $codetoconfig='')
 Return Kanban view of a module.
 
 checkForUpdate ()
 Check for module update.
 
 checkForCompliance ($nametocheck='')
 Check for module compliance with Dolibarr rules and law If a module is reported by this function,it is surely a malware.
 

Protected Member Functions

 exportTagLinks (int $r, string $categcode, string $elementtype, string $enabled, array $permission, array $fields_list)
 Configure a tag link export.
 
 importTagLinks (int $r, string $categcode, string $class_file, string $elementtype, string $element)
 Configure a tag link import.
 
- Protected Member Functions inherited from DolibarrModules
 _init ($array_sql, $options='')
 Enables a module.
 
 _remove ($array_sql, $options='')
 Disable function.
 
 _active ()
 Insert constants for module activation.
 
 _unactive ()
 Module deactivation.
 
 _load_tables ($reldir, $onlywithsuffix='')
 Create tables and keys required by module:
 
 declareNewDictionary ($dictionaryArray, $langs='')
 Helper method to declare dictionaries one at a time (rather than declaring dictionaries property by property).
 

Detailed Description

Class to describe and enable module Categorie.

Definition at line 40 of file modCategorie.class.php.

Constructor & Destructor Documentation

◆ __construct()

modCategorie::__construct ( $db)

Constructor.

Define names, constants, directories, boxes, permissions

Parameters
DoliDB$dbDatabase handler

Reimplemented from DolibarrModules.

Definition at line 47 of file modCategorie.class.php.

References description, exportTagLinks(), getDolGlobalString(), importTagLinks(), isModEnabled(), and name.

Member Function Documentation

◆ exportTagLinks()

modCategorie::exportTagLinks ( int $r,
string $categcode,
string $elementtype,
string $enabled,
array $permission,
array $fields_list )
protected

Configure a tag link export.

Parameters
int$rIndex of import tables
string$categcodeCategorie code
string$elementtypeElement type of the linked object
string$enabledCondition to enable this export
array<int,string>$permission Permission to export the linked object
array<string,array<string,string>>$fields_list Additional fields of the linked object to export
Returns
void

Definition at line 808 of file modCategorie.class.php.

References getElementProperties().

Referenced by __construct().

◆ importTagLinks()

modCategorie::importTagLinks ( int $r,
string $categcode,
string $class_file,
string $elementtype,
string $element )
protected

Configure a tag link import.

Parameters
int$rIndex of import tables
string$categcodeCategory code
string$class_fileClass file of the linked object
string$elementtypeElement type of the linked object
string$elementName of the linked object
Returns
void

Definition at line 884 of file modCategorie.class.php.

References getElementProperties().

Referenced by __construct().

◆ init()

modCategorie::init ( $options = '')

Function called when module is enabled.

The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. It also creates data directories

Parameters
string$optionsOptions when enabling module ('', 'noboxes')
Returns
int 1 if OK, 0 if KO

Reimplemented from DolibarrModules.

Definition at line 939 of file modCategorie.class.php.

References DolibarrModules\_init(), DolibarrModules\_load_tables(), and isModEnabled().


The documentation for this class was generated from the following file: