class PrintingDriver (View source)

Parent class of emailing target selectors modules

Properties

DoliDB $db
string $error
string[] $errors
string $name
string $desc
string $resprint
string $active

Methods

__construct($db)

Constructor

static 
listDrivers($db, int $maxfilenamelength = 0)

Return list of printing driver

getDesc()

Return description of Printing Module

listAvailablePrinters()

Return list of available printers

getlistAvailablePrinters()

Return list of available printers

int
printFile(string $file, string $module, string $subdir = '')

Print selected file

int
listJobs($module = null)

List jobs print

Details

__construct($db)

Constructor

@param DoliDB $db Database handler

Parameters

$db

static listDrivers($db, int $maxfilenamelength = 0)

Return list of printing driver

@param DoliDB $db Database handler

Parameters

$db
int $maxfilenamelength

Max length of value to show @return array<string,string> List of drivers

getDesc()

Return description of Printing Module

@return string Return translation of key PrintingModuleDescXXX where XXX is module name, or $this->desc if not exists

listAvailablePrinters()

Return list of available printers

@return int 0 if OK, >0 if KO

getlistAvailablePrinters()

Return list of available printers

@return array<int|string,string|array<string|int,string>> list of printers

int printFile(string $file, string $module, string $subdir = '')

Print selected file

Parameters

string $file file
string $module module
string $subdir

subdir for file

Return Value

int

0 if OK, >0 if KO

int listJobs($module = null)

List jobs print

@param ?string $module module

Parameters

$module

Return Value

int

0 if OK, >0 if KO