2017-01-06 15:44:09 +00:00
|
|
|
<?php
|
|
|
|
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
|
|
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
2018-10-27 12:43:12 +00:00
|
|
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
2017-01-06 15:44:09 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2019-09-23 19:55:30 +00:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
* or see https://www.gnu.org/
|
2017-01-06 15:44:09 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* \class ModeleProductCode
|
|
|
|
|
* \brief Parent class for product code generators
|
|
|
|
|
*/
|
2018-08-13 15:26:32 +00:00
|
|
|
|
2017-01-06 15:44:09 +00:00
|
|
|
/**
|
|
|
|
|
* \file htdocs/core/modules/contract/modules_contract.php
|
|
|
|
|
* \ingroup contract
|
|
|
|
|
* \brief File with parent class for generating contracts to PDF and File of class to manage contract numbering
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
2018-08-13 15:26:32 +00:00
|
|
|
|
2017-01-06 15:44:09 +00:00
|
|
|
/**
|
|
|
|
|
* Parent class to manage intervention document templates
|
|
|
|
|
*/
|
|
|
|
|
abstract class ModelePDFUser extends CommonDocGenerator
|
|
|
|
|
{
|
2018-08-17 16:54:41 +00:00
|
|
|
/**
|
|
|
|
|
* @var string Error code (or message)
|
|
|
|
|
*/
|
2020-04-10 08:59:32 +00:00
|
|
|
public $error = '';
|
2017-01-06 15:44:09 +00:00
|
|
|
|
|
|
|
|
|
2020-10-31 13:32:18 +00:00
|
|
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
2017-01-06 15:44:09 +00:00
|
|
|
/**
|
|
|
|
|
* Return list of active generation modules
|
|
|
|
|
*
|
2020-10-31 13:32:18 +00:00
|
|
|
* @param DoliDB $db Database handler
|
|
|
|
|
* @param integer $maxfilenamelength Max length of value to show
|
|
|
|
|
* @return array List of templates
|
2017-01-06 15:44:09 +00:00
|
|
|
*/
|
2019-03-01 22:08:57 +00:00
|
|
|
public static function liste_modeles($db, $maxfilenamelength = 0)
|
2017-01-06 15:44:09 +00:00
|
|
|
{
|
2020-10-31 13:32:18 +00:00
|
|
|
// phpcs:enable
|
2020-04-10 08:59:32 +00:00
|
|
|
$type = 'user';
|
2021-02-09 13:18:27 +00:00
|
|
|
$list = array();
|
2017-01-06 15:44:09 +00:00
|
|
|
|
|
|
|
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
2021-02-09 13:18:27 +00:00
|
|
|
$list = getListOfModels($db, $type, $maxfilenamelength);
|
|
|
|
|
return $list;
|
2017-01-06 15:44:09 +00:00
|
|
|
}
|
2018-08-13 15:26:32 +00:00
|
|
|
}
|