Repository Access Links:

This URL has Read-Only access.
Statistics
| Branch: | Revision:

dolibarr-module-template / lib / mymodule.lib.php @ ef37f43f

History | View | Annotate | Download (1.8 kB)

1
<?php
2
/* <one line to give the program's name and a brief idea of what it does.>
3
 * Copyright (C) <year>  <name of author>
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 <http://www.gnu.org/licenses/>.
17
 */
18

    
19
/**
20
 * \file    lib/mymodule.lib.php
21
 * \ingroup mymodule
22
 * \brief   Example module library.
23
 *
24
 * Put detailed description here.
25
 */
26

    
27
/**
28
 * Prepare admin pages header
29
 *
30
 * @return array
31
 */
32
function mymoduleAdminPrepareHead()
33
{
34
        global $langs, $conf;
35

    
36
        $langs->load("mymodule@mymodule");
37

    
38
        $h = 0;
39
        $head = array();
40

    
41
        $head[$h][0] = dol_buildpath("/mymodule/admin/setup.php", 1);
42
        $head[$h][1] = $langs->trans("Settings");
43
        $head[$h][2] = 'settings';
44
        $h++;
45
        $head[$h][0] = dol_buildpath("/mymodule/admin/about.php", 1);
46
        $head[$h][1] = $langs->trans("About");
47
        $head[$h][2] = 'about';
48
        $h++;
49

    
50
        // Show more tabs from modules
51
        // Entries must be declared in modules descriptor with line
52
        //$this->tabs = array(
53
        //        'entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'
54
        //); // to add new tab
55
        //$this->tabs = array(
56
        //        'entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'
57
        //); // to remove a tab
58
        complete_head_from_modules($conf, $langs, $object, $head, $h, 'mymodule');
59

    
60
        return $head;
61
}