modClickToDial.class.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.org>
  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. /**
  19. * \defgroup clicktodial Module clicktodial
  20. * \brief Module to manage a ClickToDial system
  21. * \file htdocs/core/modules/modClickToDial.class.php
  22. * \ingroup clicktodial
  23. * \brief Description and activation file for the module Click to Dial
  24. */
  25. include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
  26. /**
  27. * Class to describe and enable module Click to Dial
  28. */
  29. class modClickToDial extends DolibarrModules
  30. {
  31. /**
  32. * Constructor. Define names, constants, directories, boxes, permissions
  33. *
  34. * @param DoliDB $db Database handler
  35. */
  36. public function __construct($db)
  37. {
  38. $this->db = $db;
  39. $this->numero = 58;
  40. $this->family = "interface";
  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 = "Integration of a ClickToDial system (Asterisk, ...)";
  44. $this->descriptionlong = "Support a Click To Dial feature with a SIP system. When clicking on a phone number, your phone system automatically call the callee.";
  45. $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version
  46. $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
  47. $this->picto = 'phoning';
  48. // Data directories to create when module is enabled
  49. $this->dirs = array();
  50. // Dependencies
  51. $this->depends = array();
  52. $this->requiredby = array();
  53. // Config pages
  54. $this->config_page_url = array("clicktodial.php");
  55. // Constants
  56. $this->const = array();
  57. // Boxes
  58. $this->boxes = array();
  59. // Permissions
  60. $this->rights = array();
  61. $this->rights_class = 'clicktodial';
  62. }
  63. }