dolibarr  19.0.0-dev
modNotification.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
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 
33 {
34 
40  public function __construct($db)
41  {
42  $this->db = $db;
43  $this->numero = 600;
44 
45  // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
46  // It is used to group modules in module setup page
47  $this->family = "interface";
48  // Module position in the family on 2 digits ('01', '10', '20', ...)
49  $this->module_position = '22';
50  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
51  $this->name = preg_replace('/^mod/i', '', get_class($this));
52  $this->description = "EMail notifications (push) on business Dolibarr events";
53  $this->descriptionlong = 'Module600Long';
54  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
55  $this->version = 'dolibarr';
56  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
57  $this->picto = 'email';
58 
59  // Data directories to create when module is enabled.
60  $this->dirs = array();
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(7, 0); // Minimum version of PHP required by module
68  $this->langfiles = array("mails");
69 
70  // Config pages
71  $this->config_page_url = array("notification.php");
72 
73  // Constants
74  $this->const = array();
75 
76  // Boxes
77  $this->boxes = array();
78 
79  // Permissions
80  $this->rights = array();
81  $this->rights_class = 'notification';
82  }
83 
84 
93  public function init($options = '')
94  {
95  // Permissions
96  $this->remove($options);
97 
98  $sql = array();
99 
100  return $this->_init($sql, $options);
101  }
102 }
Class DolibarrModules.
_init($array_sql, $options='')
Enables a module.
Class to describe and enable module Mailing.
init($options='')
Function called when module is enabled.
__construct($db)
Constructor.
if(isModEnabled('facture') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.
Definition: index.php:746
print *****$script_file(".$version.") pid cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:123