dolibarr/htdocs/core/modules/modExport.class.php

100 lines
3.0 KiB
PHP
Raw Permalink Normal View History

2006-01-08 18:08:20 +01:00
<?php
/* Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
2018-10-27 14:43:12 +02:00
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
2006-01-08 18:08:20 +01:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
2006-01-08 18:08:20 +01:00
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2006-01-08 18:08:20 +01:00
*/
/**
* \defgroup export Module Export
* \brief Module to manage data exports from Dolibarr database
*
* \file htdocs/core/modules/modExport.class.php
* \ingroup export
* \brief Description and activation file for the module export
2008-10-01 21:10:17 +02:00
*/
2006-01-08 18:08:20 +01:00
include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
2006-01-08 18:08:20 +01:00
2012-10-03 00:30:50 +02:00
/**
2015-09-07 15:55:26 +02:00
* Class to describe and enable module export
2008-10-01 21:10:17 +02:00
*/
2006-01-08 18:08:20 +01:00
class modExport extends DolibarrModules
{
2008-10-01 21:10:17 +02:00
/**
2011-09-26 16:22:35 +02:00
* Constructor. Define names, constants, directories, boxes, permissions
*
2012-01-04 21:23:50 +01:00
* @param DoliDB $db Database handler
2008-10-01 21:10:17 +02:00
*/
2019-02-25 20:35:59 +01:00
public function __construct($db)
2008-10-01 21:10:17 +02:00
{
2012-01-04 21:23:50 +01:00
$this->db = $db;
2008-10-01 21:10:17 +02:00
$this->numero = 240;
$this->family = "technic";
$this->module_position = '72';
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i', '', get_class($this));
2008-10-01 21:10:17 +02:00
$this->description = "Outils d'exports de donnees Dolibarr (via un assistant)";
2017-08-22 18:34:58 +02:00
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
2016-02-19 20:05:25 +01:00
$this->picto = 'technic';
2008-10-01 21:10:17 +02:00
// Data directories to create when module is enabled
$this->dirs = array("/export/temp");
2008-10-01 21:10:17 +02:00
// Config pages
2018-01-18 12:34:22 +01:00
$this->config_page_url = array("export.php");
2008-10-01 21:10:17 +02:00
2015-09-07 15:29:51 +02:00
// Dependencies
2008-10-01 21:10:17 +02:00
$this->depends = array();
$this->requiredby = array();
2022-09-27 20:48:47 +02:00
$this->phpmin = array(7, 0);
2008-10-01 21:10:17 +02:00
$this->phpmax = array();
2023-01-09 12:30:56 +01:00
$this->enabled_bydefault = true; // Will be enabled during install
2008-10-01 21:10:17 +02:00
2015-09-07 15:40:55 +02:00
// Constants
2008-10-01 21:10:17 +02:00
$this->const = array();
// Boxes
$this->boxes = array();
// Permissions
$this->rights = array();
$this->rights_class = 'export';
$r = 0;
2009-07-29 21:47:15 +02:00
$r++;
$this->rights[$r][0] = 1201;
2021-03-29 13:49:24 +02:00
$this->rights[$r][1] = 'Read exports';
2009-07-29 21:47:15 +02:00
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
2009-07-29 21:47:15 +02:00
$this->rights[$r][4] = 'lire';
$r++;
$this->rights[$r][0] = 1202;
2021-03-29 13:49:24 +02:00
$this->rights[$r][1] = 'Creeate/modify export';
2009-07-29 21:47:15 +02:00
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'creer';
2017-08-22 18:34:58 +02:00
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
2008-10-01 21:10:17 +02:00
}
2006-01-08 18:08:20 +01:00
}