dolibarr 21.0.0-alpha
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
27include_once DOL_DOCUMENT_ROOT.'/core/modules/DolibarrModules.class.php';
28
33{
39 public function __construct($db)
40 {
41 $this->db = $db;
42 $this->numero = 600;
43
44 // Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
45 // It is used to group modules in module setup page
46 $this->family = "interface";
47 // Module position in the family on 2 digits ('01', '10', '20', ...)
48 $this->module_position = '22';
49 // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
50 $this->name = preg_replace('/^mod/i', '', get_class($this));
51 $this->description = "EMail notifications (push) on business Dolibarr events";
52 $this->descriptionlong = 'Module600Long';
53 // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
54 $this->version = 'dolibarr';
55 $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
56 $this->picto = 'email';
57
58 // Data directories to create when module is enabled.
59 $this->dirs = array();
60
61 // Dependencies
62 $this->hidden = false; // A condition to hide module
63 $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
64 $this->requiredby = array(); // List of module ids to disable if this one is disabled
65 $this->conflictwith = array(); // List of module class names as string this module is in conflict with
66 $this->phpmin = array(7, 0); // Minimum version of PHP required by module
67 $this->langfiles = array("mails");
68
69 // Config pages
70 $this->config_page_url = array("notification.php");
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 = 'notification';
81 }
82
83
92 public function init($options = '')
93 {
94 // Permissions
95 $this->remove($options);
96
97 $sql = array();
98
99 return $this->_init($sql, $options);
100 }
101}
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.
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after 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:142