1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <[email protected]> |
4
|
|
|
* Copyright (C) 2004-2011 Laurent Destailleur <[email protected]> |
5
|
|
|
* Copyright (C) 2004 Eric Seigne <[email protected]> |
6
|
|
|
* Copyright (C) 2005-2012 Regis Houssin <[email protected]> |
7
|
|
|
* Copyright (C) 2006 Andre Cianfarani <[email protected]> |
8
|
|
|
* Copyright (C) 2012 Juanjo Menent <[email protected]> |
9
|
|
|
* Copyright (C) 2014 Marcos García <[email protected]> |
10
|
|
|
* Copyright (C) 2024 Rafael San José <[email protected]> |
11
|
|
|
* |
12
|
|
|
* This program is free software; you can redistribute it and/or modify |
13
|
|
|
* it under the terms of the GNU General Public License as published by |
14
|
|
|
* the Free Software Foundation; either version 3 of the License, or |
15
|
|
|
* (at your option) any later version. |
16
|
|
|
* |
17
|
|
|
* This program is distributed in the hope that it will be useful, |
18
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
19
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20
|
|
|
* GNU General Public License for more details. |
21
|
|
|
* |
22
|
|
|
* You should have received a copy of the GNU General Public License |
23
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
24
|
|
|
* or see https://www.gnu.org/ |
25
|
|
|
*/ |
26
|
|
|
|
27
|
|
|
namespace Dolibarr\Code\Asset\Classes; |
28
|
|
|
|
29
|
|
|
use Dolibarr\Code\Core\Classes\CommonDocGenerator; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* \file htdocs/core/modules/asset/modules_asset.php |
33
|
|
|
* \ingroup asset |
34
|
|
|
* \brief File that contains parent class for assets document models and parent class for assets numbering models |
35
|
|
|
*/ |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Parent class for documents models |
39
|
|
|
*/ |
40
|
|
|
abstract class ModelePDFAsset extends CommonDocGenerator |
41
|
|
|
{ |
42
|
|
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
43
|
|
|
/** |
44
|
|
|
* Return list of active generation modules |
45
|
|
|
* |
46
|
|
|
* @param DoliDB $db Database handler |
|
|
|
|
47
|
|
|
* @param integer $maxfilenamelength Max length of value to show |
48
|
|
|
* @return array List of templates |
49
|
|
|
*/ |
50
|
|
|
public static function liste_modeles($db, $maxfilenamelength = 0) |
51
|
|
|
{ |
52
|
|
|
// phpcs:enable |
53
|
|
|
$type = 'asset'; |
54
|
|
|
$list = array(); |
55
|
|
|
|
56
|
|
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
57
|
|
|
$list = getListOfModels($db, $type, $maxfilenamelength); |
58
|
|
|
|
59
|
|
|
return $list; |
|
|
|
|
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
|