dolibarr  7.0.0-beta
Public Member Functions | List of all members
modTcpdfbarcode Class Reference

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

+ Inheritance diagram for modTcpdfbarcode:
+ Collaboration diagram for modTcpdfbarcode:

Public Member Functions

 info ()
 Return description of numbering model. More...
 
 isEnabled ()
 Return if a module can be used or not. More...
 
 canBeActivated ()
 Test si les numeros deja en vigueur dans la base ne provoquent pas de de conflits qui empechera cette numerotation de fonctionner. 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 wth its translated description More...
 
- Public Member Functions inherited from ModeleBarCode
 isEnabled ()
 Return if a model can be used or not. More...
 

Detailed Description

Class to generate barcode images using tcpdf barcode generator.

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

Member Function Documentation

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
integer$scaleScale (not used with this engine)
integer$nooutputiferrorNo output if error (not used with this engine)
Returns
int <0 if KO, >0 if OK

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

References dol_syslog(), and getTcpdfEncodingType().

modTcpdfbarcode::canBeActivated ( )

Test si les numeros deja en vigueur dans la base ne provoquent pas de de conflits qui empechera cette numerotation de fonctionner.

Returns
boolean false si conflit, true si ok

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

modTcpdfbarcode::encodingIsSupported (   $encoding)

Return true if encoding is supported.

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

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

References getTcpdfEncodingType().

modTcpdfbarcode::getTcpdfEncodingType (   $dolEncodingType)

get available output_modes for tcpdf class wth its translated description

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

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

Referenced by buildBarCode(), encodingIsSupported(), and writeBarCode().

modTcpdfbarcode::info ( )

Return description of numbering model.

Returns
string Text with description

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

modTcpdfbarcode::isEnabled ( )

Return if a module can be used or not.

Returns
boolean true if module can be used

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

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
string$readableCode can be read
integer$scaleScale (not used with this engine)
integer$nooutputiferrorNo output if error (not used with this engine)
Returns
int <0 if KO, >0 if OK

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

References dol_mkdir(), dol_syslog(), and getTcpdfEncodingType().


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