dolibarr  7.0.0-beta
modules_task.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
3  * Copyright (C) 2010 Florian Henry <florian.henry<àopen-concept.pro>
4  * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  * or see http://www.gnu.org/
19  */
20 
27 require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
28 
29 
33 abstract class ModelePDFTask extends CommonDocGenerator
34 {
35  var $error='';
36 
37 
45  static function liste_modeles($db,$maxfilenamelength=0)
46  {
47  global $conf;
48 
49  $type='project_task';
50  $liste=array();
51 
52  include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
53  $liste=getListOfModels($db,$type,$maxfilenamelength);
54 
55  return $liste;
56  }
57 }
58 
59 
60 
64 abstract class ModeleNumRefTask
65 {
66  var $error='';
67 
73  function isEnabled()
74  {
75  return true;
76  }
77 
83  function info()
84  {
85  global $langs;
86  $langs->load("projects");
87  return $langs->trans("NoDescription");
88  }
89 
95  function getExample()
96  {
97  global $langs;
98  $langs->load("projects");
99  return $langs->trans("NoExample");
100  }
101 
108  function canBeActivated()
109  {
110  return true;
111  }
112 
120  function getNextValue($objsoc, $project)
121  {
122  global $langs;
123  return $langs->trans("NotAvailable");
124  }
125 
131  function getVersion()
132  {
133  global $langs;
134  $langs->load("admin");
135 
136  if ($this->version == 'development') return $langs->trans("VersionDevelopment");
137  if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
138  if ($this->version == 'dolibarr') return DOL_VERSION;
139  return $langs->trans("NotAvailable");
140  }
141 }
Classe mere des modeles de numerotation des references de projets.
Parent class for projects models.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
canBeActivated()
Test si les numeros deja en vigueur dans la base ne provoquent pas de de conflits qui empechera cette...
getNextValue($objsoc, $project)
Renvoi prochaine valeur attribuee.
getExample()
Renvoi un exemple de numerotation.
info()
Renvoi la description par defaut du modele de numerotation.
getVersion()
Renvoi version du module numerotation.
isEnabled()
Return if a module can be used or not.
Parent class for documents generators.
getListOfModels($db, $type, $maxfilenamelength=0)
Return list of activated modules usable for document generation.