dolibarr 21.0.0-alpha
modBookmark.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
29
34{
40 public function __construct($db)
41 {
42 $this->db = $db;
43 $this->numero = 330;
44
45 $this->family = "technic";
46 // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
47 $this->name = preg_replace('/^mod/i', '', get_class($this));
48 $this->description = "Gestion des Bookmarks";
49
50 // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
51 $this->version = 'dolibarr';
52
53 $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
54 $this->picto = 'bookmark';
55
56 // Data directories to create when module is enabled
57 $this->dirs = array();
58
59 // Dependencies
60 $this->depends = array();
61 $this->requiredby = array();
62 $this->langfiles = array("bookmarks");
63
64 // Config pages
65 $this->config_page_url = array('bookmark.php@bookmarks');
66
67 // Constants
68 $this->const = array();
69
70 // Boxes
71 $this->boxes = array(
72 0=>array('file'=>'box_bookmarks.php', 'enabledbydefaulton'=>'Home')
73 );
74
75 // Permissions
76 $this->rights = array();
77 $this->rights_class = 'bookmark';
78 $r = 0;
79
80 $r++;
81 $this->rights[$r][0] = 331; // id de la permission
82 $this->rights[$r][1] = 'Lire les bookmarks'; // libelle de la permission
83 $this->rights[$r][2] = 'r'; // type de la permission (deprecated)
84 $this->rights[$r][3] = 0; // La permission est-elle une permission par default
85 $this->rights[$r][4] = 'lire';
86
87 $r++;
88 $this->rights[$r][0] = 332; // id de la permission
89 $this->rights[$r][1] = 'Creer/modifier les bookmarks'; // libelle de la permission
90 $this->rights[$r][2] = 'r'; // type de la permission (deprecated)
91 $this->rights[$r][3] = 0; // La permission est-elle une permission par default
92 $this->rights[$r][4] = 'creer';
93
94 $r++;
95 $this->rights[$r][0] = 333; // id de la permission
96 $this->rights[$r][1] = 'Supprimer les bookmarks'; // libelle de la permission
97 $this->rights[$r][2] = 'r'; // type de la permission (deprecated)
98 $this->rights[$r][3] = 0; // La permission est-elle une permission par default
99 $this->rights[$r][4] = 'supprimer';
100
101
102 // Menus
103 //-------
104 $this->menu = 1; // This module add menu entries. They are coded into menu manager.
105 }
106}
Class DolibarrModules.
Class to describe and enable module Bookmark.
__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:140