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

Classe permettant la gestion des formulaire du module resource. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 select_resource_list ($selected='', $htmlname='fk_resource', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $event=array(), $filterkey='', $outputmode=0, $limit=20)
 Output html form to select a resource. More...
 
 select_types_resource ($selected='', $htmlname='type_resource', $filtertype='', $format=0, $empty=0, $noadmininfo=0, $maxlength=0)
 Return html list of tickets type. More...
 

Detailed Description

Classe permettant la gestion des formulaire du module resource.

Remarks
Utilisation: $formresource = new FormResource($db)
$formplace->proprietes=1 ou chaine ou tableau de valeurs

Definition at line 34 of file html.formresource.class.php.

Constructor & Destructor Documentation

FormResource::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 49 of file html.formresource.class.php.

Member Function Documentation

FormResource::select_resource_list (   $selected = '',
  $htmlname = 'fk_resource',
  $filter = '',
  $showempty = 0,
  $showtype = 0,
  $forcecombo = 0,
  $event = array(),
  $filterkey = '',
  $outputmode = 0,
  $limit = 20 
)

Output html form to select a resource.

Parameters
int$selectedPreselected resource id
string$htmlnameName of field in form
string$filterOptionnal filters criteras (example: 's.rowid <> x')
int$showemptyAdd an empty field
int$showtypeShow third party type in combolist (customer, prospect or supplier)
int$forcecomboForce to use combo box
array$eventEvent options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
string$filterkeyFilter on key value
int$outputmode0=HTML select string, 1=Array, 2=without form tag
int$limitLimit number of answers
Returns
string HTML string with

Definition at line 72 of file html.formresource.class.php.

References ajax_combobox(), and dol_print_error().

FormResource::select_types_resource (   $selected = '',
  $htmlname = 'type_resource',
  $filtertype = '',
  $format = 0,
  $empty = 0,
  $noadmininfo = 0,
  $maxlength = 0 
)

Return html list of tickets type.

Parameters
string$selectedId du type pre-selectionne
string$htmlnameNom de la zone select
string$filtertypeTo filter on field type in llx_c_ticketsup_type (array('code'=>xx,'label'=>zz))
int$format0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
int$empty1=peut etre vide, 0 sinon
int$noadmininfo0=Add admin info, 1=Disable admin info
int$maxlengthMax length of label
Returns
void

Definition at line 163 of file html.formresource.class.php.

References dol_syslog(), dol_trunc(), info_admin(), and print.


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