dolibarr  20.0.0-alpha
Public Member Functions | List of all members
modTcpdfbarcode Class Reference

Class to generate barcode images using tcpdf barcode generator. More...

Inheritance diagram for modTcpdfbarcode:
Inheritance graph
[legend]
Collaboration diagram for modTcpdfbarcode:
Collaboration graph
[legend]

Public Member Functions

 info ($langs)
 Return description of numbering model. More...
 
 isEnabled ()
 Return if a module can be used or not. More...
 
 canBeActivated ($object)
 Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working. More...
 
 encodingIsSupported ($encoding)
 Return true if encoding is supported. More...
 
 buildBarCode ($code, $encoding, $readable='Y', $scale=1, $nooutputiferror=0)
 Return an image file on the fly (no need to write on disk) More...
 
 writeBarCode ($code, $encoding, $readable='Y', $scale=1, $nooutputiferror=0)
 Save an image file on disk (with no output) More...
 
 getTcpdfEncodingType ($dolEncodingType)
 get available output_modes for tcpdf class with its translated description More...
 

Detailed Description

Class to generate barcode images using tcpdf barcode generator.

Definition at line 33 of file tcpdfbarcode.modules.php.

Member Function Documentation

◆ buildBarCode()

modTcpdfbarcode::buildBarCode (   $code,
  $encoding,
  $readable = 'Y',
  $scale = 1,
  $nooutputiferror = 0 
)

Return an image file on the fly (no need to write on disk)

Parameters
string$codeValue to encode
string$encodingMode of encoding
string$readableCode can be read (What is this ? is this used ?)
integer$scaleScale (not used with this engine)
integer$nooutputiferrorNo output if error (not used with this engine)
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 107 of file tcpdfbarcode.modules.php.

◆ canBeActivated()

modTcpdfbarcode::canBeActivated (   $object)

Checks if the numbers already in the database do not cause conflicts that would prevent this numbering working.

Parameters
Object$objectObject we need next value for
Returns
boolean false if KO (there is a conflict), true if OK

Definition at line 76 of file tcpdfbarcode.modules.php.

◆ encodingIsSupported()

modTcpdfbarcode::encodingIsSupported (   $encoding)

Return true if encoding is supported.

Parameters
string$encodingEncoding norm
Returns
int >0 if supported, 0 if not

Definition at line 87 of file tcpdfbarcode.modules.php.

◆ getTcpdfEncodingType()

modTcpdfbarcode::getTcpdfEncodingType (   $dolEncodingType)

get available output_modes for tcpdf class with its translated description

Parameters
string$dolEncodingTypedolibarr barcode encoding type
Returns
string tcpdf encoding type

Definition at line 233 of file tcpdfbarcode.modules.php.

◆ info()

modTcpdfbarcode::info (   $langs)

Return description of numbering model.

Parameters
Translate$langsLang object to use for output
Returns
string Descriptive text

Definition at line 54 of file tcpdfbarcode.modules.php.

◆ isEnabled()

modTcpdfbarcode::isEnabled ( )

Return if a module can be used or not.

Returns
boolean true if module can be used

Reimplemented from ModeleBarCode.

Definition at line 64 of file tcpdfbarcode.modules.php.

◆ writeBarCode()

modTcpdfbarcode::writeBarCode (   $code,
  $encoding,
  $readable = 'Y',
  $scale = 1,
  $nooutputiferror = 0 
)

Save an image file on disk (with no output)

Parameters
string$codeValue to encode
string$encodingMode of encoding ('QRCODE', 'EAN13', ...)
string$readableCode can be read
integer$scaleScale (not used with this engine)
integer$nooutputiferrorNo output if error (not used with this engine)
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 153 of file tcpdfbarcode.modules.php.


The documentation for this class was generated from the following file: