25require_once DOL_DOCUMENT_ROOT.
'/core/class/commondocgenerator.class.php';
38 public $driverlabel = array();
40 public $driverdesc = array();
42 public $driverversion = array();
44 public $liblabel = array();
46 public $libversion = array();
89 dol_syslog(get_class($this).
"::listOfAvailableExportFormat");
91 $dir = DOL_DOCUMENT_ROOT.
"/core/modules/export/";
92 $handle = opendir($dir);
96 if (is_resource($handle)) {
97 while (($file = readdir($handle)) !==
false) {
99 if (preg_match(
"/^export_(.*)\.modules\.php$/i", $file, $reg)) {
101 if ($moduleid ==
'csv') {
106 $file = $dir.
"export_".$moduleid.
".modules.php";
107 $classname =
"Export".ucfirst($moduleid);
110 if (class_exists($classname)) {
111 $module =
new $classname($db);
115 $this->picto[$module->id] = $module->picto;
117 $this->driverlabel[$module->id] = $module->getDriverLabel().(empty($module->disabled) ?
'' :
' __(Disabled)__');
118 if (method_exists($module,
'getDriverLabelBis')) {
119 if ($module->getDriverLabelBis()) {
120 $this->driverlabel[$module->id] .=
' <span class="opacitymedium">('.$module->getDriverLabelBis().
')</span>';
123 $this->driverdesc[$module->id] = $module->getDriverDesc();
124 $this->driverversion[$module->id] = $module->getDriverVersion();
126 $this->liblabel[$module->id] = $module->getLibLabel();
127 $this->libversion[$module->id] = $module->getLibVersion();
135 asort($this->driverlabel);
137 return $this->driverlabel;
149 return $this->picto[$key];
160 return $this->driverlabel[$key];
171 return $this->driverdesc[$key];
182 return $this->driverversion[$key];
193 return $this->liblabel[$key];
204 return $this->libversion[$key];
Parent class for documents (PDF, ODT, ...) generators.
Parent class for export modules.
getDriverLabelForKey($key)
Return label of driver export.
getDriverVersionForKey($key)
Renvoi version d'un driver export.
getLibVersionForKey($key)
Return version of driver lib.
getDriverDescForKey($key)
Renvoi le descriptif d'un driver export.
listOfAvailableExportFormat($db, $maxfilenamelength=0)
Load into memory list of available export format.
getLibLabelForKey($key)
Renvoi label of driver lib.
getPictoForKey($key)
Return picto of export driver.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.