modWebServices.class.php 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. */
  17. /**
  18. * \defgroup webservices Module webservices
  19. * \brief Module to enable the Dolibarr server of web services
  20. * \file htdocs/core/modules/modWebServices.class.php
  21. * \ingroup webservices
  22. * \brief Description and activation file for the module webservices
  23. */
  24. include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
  25. /**
  26. * Class to describe a WebServices module
  27. */
  28. class modWebServices extends DolibarrModules
  29. {
  30. /**
  31. * Constructor. Define names, constants, directories, boxes, permissions
  32. *
  33. * @param DoliDB $db Database handler
  34. */
  35. public function __construct($db)
  36. {
  37. $this->db = $db;
  38. $this->numero = 2600;
  39. $this->family = "interface";
  40. $this->module_position = '25';
  41. // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
  42. $this->name = preg_replace('/^mod/i', '', get_class($this));
  43. $this->description = "Enable the Dolibarr web services server";
  44. // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
  45. $this->version = 'dolibarr_deprecated';
  46. // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
  47. $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
  48. // Name of image file used for this module.
  49. $this->picto = 'technic';
  50. // Data directories to create when module is enabled
  51. $this->dirs = array();
  52. // Config pages
  53. $this->config_page_url = array("index.php@webservices");
  54. // Dependencies
  55. $this->hidden = false; // A condition to hide module
  56. $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
  57. $this->requiredby = array(); // List of module ids to disable if this one is disabled
  58. $this->conflictwith = array(); // List of module class names as string this module is in conflict with
  59. $this->phpmin = array(7, 0); // Minimum version of PHP required by module
  60. $this->langfiles = array("other");
  61. // Constants
  62. $this->const = array();
  63. // New pages on tabs
  64. $this->tabs = array();
  65. // Boxes
  66. $this->boxes = array();
  67. // Permissions
  68. $this->rights = array();
  69. $this->rights_class = 'webservices';
  70. $r = 0;
  71. }
  72. }