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

Parent class for documents generators. More...

+ Inheritance diagram for CommonDocGenerator:

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 get_substitutionarray_user ($user, $outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_mysoc ($mysoc, $outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_thirdparty ($object, $outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_contact ($object, $outputlangs, $array_key= 'object')
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_other ($outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_object ($object, $outputlangs, $array_key='object')
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_lines ($line, $outputlangs)
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_shipment ($object, $outputlangs, $array_key='object')
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_shipment_lines ($line, $outputlangs)
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_each_var_object (&$object, $outputlangs, $recursive=true)
 Define array with couple subtitution key => subtitution value. More...
 
 fill_substitutionarray_with_extrafields ($object, $array_to_fill, $extrafields, $array_key, $outputlangs)
 Fill array with couple extrafield key => extrafield value. More...
 
 printRect ($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
 Rect pdf. More...
 

Detailed Description

Parent class for documents generators.

Definition at line 34 of file commondocgenerator.class.php.

Constructor & Destructor Documentation

CommonDocGenerator::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 45 of file commondocgenerator.class.php.

Member Function Documentation

CommonDocGenerator::fill_substitutionarray_with_extrafields (   $object,
  $array_to_fill,
  $extrafields,
  $array_key,
  $outputlangs 
)

Fill array with couple extrafield key => extrafield value.

Parameters
Object$objectObject with extrafields (must have $object->array_options filled)
array$array_to_fillSubstitution array
Extrafields$extrafieldsExtrafields object
string$array_keyPrefix for name of the keys into returned array
Translate$outputlangsLang object to use for output
Returns
array Substitution array

Definition at line 664 of file commondocgenerator.class.php.

References dol_print_date(), price(), and price2num().

Referenced by get_substitutionarray_lines(), doc_generic_project_odt\get_substitutionarray_object(), doc_generic_task_odt\get_substitutionarray_object(), and get_substitutionarray_object().

CommonDocGenerator::get_substitutionarray_contact (   $object,
  $outputlangs,
  $array_key = 'object' 
)

Define array with couple subtitution key => subtitution value.

Parameters
Contact$objectcontact
Translate$outputlangsobject for output
array_key$array_keyName of the key for return array
Returns
array of substitution key->code

Definition at line 232 of file commondocgenerator.class.php.

References getState(), and price().

Referenced by doc_generic_odt\write_file(), doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_user_odt\write_file(), doc_generic_product_odt\write_file(), doc_generic_usergroup_odt\write_file(), doc_generic_proposal_odt\write_file(), and doc_generic_project_odt\write_file().

CommonDocGenerator::get_substitutionarray_each_var_object ( $object,
  $outputlangs,
  $recursive = true 
)

Define array with couple subtitution key => subtitution value.

Parameters
Object$objectDolibarr Object
Translate$outputlangsLanguage object for output
boolean$recursiveWant to fetch child array or child object
Returns
array Array of substitution key->code

Definition at line 636 of file commondocgenerator.class.php.

Referenced by doc_generic_contract_odt\write_file(), doc_generic_product_odt\write_file(), and doc_generic_usergroup_odt\write_file().

CommonDocGenerator::get_substitutionarray_lines (   $line,
  $outputlangs 
)

Define array with couple substitution key => substitution value.

Parameters
array$lineArray of lines
Translate$outputlangsLang object to use for output
Returns
array Return a substitution array

Definition at line 474 of file commondocgenerator.class.php.

References doc_getlinedesc(), dol_print_date(), fill_substitutionarray_with_extrafields(), price(), price2num(), and vatrate().

Referenced by doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), and doc_generic_proposal_odt\write_file().

CommonDocGenerator::get_substitutionarray_mysoc (   $mysoc,
  $outputlangs 
)
CommonDocGenerator::get_substitutionarray_object (   $object,
  $outputlangs,
  $array_key = 'object' 
)

Define array with couple substitution key => substitution value.

Parameters
Object$objectMain object to use as data source
Translate$outputlangsLang object to use for output
string$array_keyName of the key for return array
Returns
array Array of substitution

Definition at line 331 of file commondocgenerator.class.php.

References dol_print_date(), fill_substitutionarray_with_extrafields(), price(), price2num(), and vatrate().

Referenced by doc_generic_contract_odt\write_file(), doc_generic_invoice_odt\write_file(), doc_generic_order_odt\write_file(), doc_generic_supplier_proposal_odt\write_file(), and doc_generic_proposal_odt\write_file().

CommonDocGenerator::get_substitutionarray_other (   $outputlangs)
CommonDocGenerator::get_substitutionarray_shipment (   $object,
  $outputlangs,
  $array_key = 'object' 
)

Define array with couple substitution key => substitution value.

Parameters
Expedition$objectMain object to use as data source
Translate$outputlangsLang object to use for output
array_key$array_keyName of the key for return array
Returns
array Array of substitution

Definition at line 542 of file commondocgenerator.class.php.

References dol_include_once(), dol_print_date(), measuring_units_string(), and price().

Referenced by doc_generic_shipment_odt\write_file().

CommonDocGenerator::get_substitutionarray_shipment_lines (   $line,
  $outputlangs 
)

Define array with couple substitution key => substitution value.

Parameters
array$lineArray of lines
Translate$outputlangsLang object to use for output
Returns
array Substitution array

Definition at line 601 of file commondocgenerator.class.php.

References doc_getlinedesc(), dol_include_once(), measuring_units_string(), price(), and vatrate().

Referenced by doc_generic_shipment_odt\write_file().

CommonDocGenerator::get_substitutionarray_thirdparty (   $object,
  $outputlangs 
)
CommonDocGenerator::get_substitutionarray_user (   $user,
  $outputlangs 
)
CommonDocGenerator::printRect (   $pdf,
  $x,
  $y,
  $l,
  $h,
  $hidetop = 0,
  $hidebottom = 0 
)

Rect pdf.

Parameters
PDF$pdfObject PDF
float$xAbscissa of first point
float$yOrdinate of first point
float$l??
float$h??
int$hidetop1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
int$hidebottomHide bottom
Returns
void

Definition at line 727 of file commondocgenerator.class.php.

Referenced by pdf_strato\_tableau(), pdf_soleil\_tableau(), pdf_standard\_tableau(), pdf_typhon\_tableau(), pdf_rouget\_tableau(), pdf_canelle\_tableau(), pdf_muscadet\_tableau(), pdf_aurore\_tableau(), pdf_einstein\_tableau(), pdf_azur\_tableau(), and pdf_crabe\_tableau().


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