dolibarr 18.0.6
FormResource Class Reference

Class to manage forms for the module resource. More...

Public Member Functions

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

Detailed Description

Class to manage forms for the module resource.

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

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

Constructor & Destructor Documentation

◆ __construct()

FormResource::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

◆ select_resource_list()

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

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
string$morecssMore css
bool$multipleadd [] in the name of element and add 'multiple' attribut
Returns
string|array HTML string with

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

References ajax_combobox(), and dol_print_error().

◆ select_types_resource()

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_ticket_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 178 of file html.formresource.class.php.

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


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