class FormIntervention (View source)

Class to manage generation of HTML components for intervention module

Properties

DoliDB $db
string $error

Methods

__construct(DoliDB $db)

Constructor

string
select_interventions(int $socid = -1, int $selected = 0, string $htmlname = 'interventionid', int $maxlength = 16, string $showempty = '1', bool $draftonly = false)

Show a combo list with interventions qualified for a third party

Details

__construct(DoliDB $db)

Constructor

Parameters

DoliDB $db

Database handler

string select_interventions(int $socid = -1, int $selected = 0, string $htmlname = 'interventionid', int $maxlength = 16, string $showempty = '1', bool $draftonly = false)

Show a combo list with interventions qualified for a third party

Parameters

int $socid

Id third party (-1=all, 0=only interventions not linked to a third party, id=intervention not linked or linked to third party id)

int $selected

Id intervention preselected

string $htmlname

Nom de la zone html

int $maxlength

Maximum length of label

string $showempty

Show empty line ('1' or string to show for empty line)

bool $draftonly

Show only drafts intervention

Return Value

string

HTML code for the select list if OK, empty if KO