dolibarr  16.0.5
modImport.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
27 include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
28 
29 
34 {
35 
41  public function __construct($db)
42  {
43  $this->db = $db;
44  $this->numero = 250;
45 
46  $this->family = "technic";
47  $this->module_position = '70';
48  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
49  $this->name = preg_replace('/^mod/i', '', get_class($this));
50  $this->description = "Outils d'imports de donnees Dolibarr (via un assistant)";
51  // Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
52  $this->version = 'dolibarr';
53  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
54  $this->picto = 'technic';
55 
56  // Data directories to create when module is enabled
57  $this->dirs = array("/import/temp");
58 
59  // Config pages
60  $this->config_page_url = array("import.php");
61 
62  // Dependencies
63  $this->hidden = false; // A condition to hide module
64  $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
65  $this->requiredby = array(); // List of module ids to disable if this one is disabled
66  $this->conflictwith = array(); // List of module class names as string this module is in conflict with
67  $this->phpmin = array(5, 6); // Minimum version of PHP required by module - Need auto_detect_line_endings php option to solve MAC pbs.
68  $this->phpmax = array();
69  $this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module
70  $this->need_javascript_ajax = 1;
71 
72  // Constants
73  $this->const = array();
74 
75  // Boxes
76  $this->boxes = array();
77 
78  // Permissions
79  $this->rights = array();
80  $this->rights_class = 'import';
81  $r = 0;
82 
83  $r++;
84  $this->rights[$r][0] = 1251;
85  $this->rights[$r][1] = 'Run mass imports of external data (data load)';
86  $this->rights[$r][2] = 'r';
87  $this->rights[$r][3] = 0;
88  $this->rights[$r][4] = 'run';
89 
90 
91  // Menus
92  //-------
93  $this->menu = 1; // This module add menu entries. They are coded into menu manager.
94  }
95 }
db
$conf db
API class for accounts.
Definition: inc.php:41
description
print *****$script_file(".$version.") pid cd cd cd description as description
Definition: email_expire_services_to_customers.php:83
name
$conf db name
Definition: repair.php:122
modImport
Class to describe and enable module Import.
Definition: modImport.class.php:33
modImport\__construct
__construct($db)
Constructor.
Definition: modImport.class.php:41
DolibarrModules
Class DolibarrModules.
Definition: DolibarrModules.class.php:37